コガネブログ

平日更新を目標に Unity や C#、Visual Studio、ReSharper などのゲーム開発アレコレを書いていきます

2024-03-13から1日間の記事一覧

【Unity】ArgumentException: GetComponent requires that the requested component 'GameObject' derives from MonoBehaviour or Component or is an interface.

概要 using UnityEngine; public class Example : MonoBehaviour { private void Start() { var go = gameObject.GetComponent<GameObject>(); } } 上記のようなコードを実行したら ArgumentException: GetComponent requires that the requested component 'GameObject'</gameobject>…

【Unity】Crashlytics.ReportUncaughtExceptionsAsFatal で、捕捉されなかった例外を「非致命的」ではなく「クラッシュ」として扱う

概要 using System; using UnityEngine; public class Hoge : MonoBehaviour { private void Update() { throw new Exception( "ピカチュウ" ); } } Firebase の Crashlytics では通常、try ~ catch で捕捉されなかった例外は 「非致命的」として扱われるが…