public void Awake() { SceneManager.sceneLoaded += OnSceneLoaded; if (singleton != null) { Debug.LogAssertion("It seems that multiple Camera Mode Controllers are active, breaking the singleton instance."); } singleton = this; }
public void OnDestroy() { singleton = null; }