private static void RuntimeInit()
        {
            var handler = new MutableObjectHandler(FindMutableObjects());

            handler.SetInitialMutableObjectValues();

            SceneManager.activeSceneChanged += (curr, next) => handler.ResetActiveSceneChange();
            SceneManager.sceneUnloaded      += scene => handler.ResetSceneUnloaded();
            SceneManager.sceneLoaded        += (scene, mode) => handler.ResetSceneLoaded();
        }
Beispiel #2
0
 private static void RegisterSceneListeners(MutableObjectHandler handler)
 {
     SceneManager.activeSceneChanged += (curr, next) => handler.ResetActiveSceneChange();
     SceneManager.sceneUnloaded      += scene => handler.ResetSceneUnloaded();
     SceneManager.sceneLoaded        += (scene, mode) => handler.ResetSceneLoaded();
 }