void OnDestroy()
 {
     if (s_Instance == this)
     {
         s_Instance = null;
         DisposeOfBatches();
     }
 }
        static void Initialize()
        {
            if (s_Instance != null)
            {
                return;
            }

            s_Instance = new GameObject("[Controllers]").AddComponent <LifecycleManager>();
            DontDestroyOnLoad(s_Instance.gameObject);
        }
예제 #3
0
 void OnDisableINTERNAL()
 {
     LifecycleManager.UnregisterSceneObject(this);
 }
예제 #4
0
 void OnEnableINTERNAL()
 {
     LifecycleManager.RegisterSceneObject(this);
 }