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(); }
private static void RegisterSceneListeners(MutableObjectHandler handler) { SceneManager.activeSceneChanged += (curr, next) => handler.ResetActiveSceneChange(); SceneManager.sceneUnloaded += scene => handler.ResetSceneUnloaded(); SceneManager.sceneLoaded += (scene, mode) => handler.ResetSceneLoaded(); }