Exemple #1
0
 void OnDisable()
 {
     if (!Application.isPlaying)     //only in editor.
     {
         Teardown();
     }
     StopCoroutine("RunLateFixedUpdate");
     ObiArbiter.UnregisterSolver(this);
 }
        void OnDisable()
        {
            if (!Application.isPlaying)     //only in editor.
            {
                Teardown();
            }
            StopCoroutine("RunLateFixedUpdate");
            switch (updateMode)
            {
            case UpdateMode.FixedUpdate: fixedUpdateArbiter.UnregisterSolver(this); break;

            case UpdateMode.AfterFixedUpdate: afterFixedUpdateArbiter.UnregisterSolver(this); break;

            case UpdateMode.LateUpdate: lateUpdateArbiter.UnregisterSolver(this); break;
            }
        }