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); }
void OnDisableINTERNAL() { LifecycleManager.UnregisterSceneObject(this); }
void OnEnableINTERNAL() { LifecycleManager.RegisterSceneObject(this); }