MissingReferenceException: The object of type HogeClass' has been destroyed but you are still trying to access it.
「HogeClass」GameObjectがもうDestroyされてるのにそれにアタッチされた関数が呼ばれるとよくこの現象が起こる。
private bool _isDestroy = true; void OnDestroy() { _isDestroy = true; } void Hoge() { if (_isDestroy) return; SomeMethod(); }
僕はこのようにDestroyされてたら_isDestroyのフラグをつけてよばさないするようにした。