Esempio n. 1
0
 void OnEnable()
 {
     if (!Application.isPlaying)     //only in editor.
     {
         Initialize();
     }
     StartCoroutine("RunLateFixedUpdate");
     ObiArbiter.RegisterSolver(this);
 }
Esempio n. 2
0
        void OnEnable()
        {
            if (!Application.isPlaying)     //only in editor.
            {
                Initialize();
            }

            StartCoroutine("RunLateFixedUpdate");

            switch (updateMode)
            {
            case UpdateMode.FixedUpdate: fixedUpdateArbiter.RegisterSolver(this); break;

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

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