public virtual void Start() { if (ConfigState.Instance.UseVerboseLogging) { Debug.Log("Base Scene Controller Start"); } if (!DeferInitialRestoreToSubclass && AutoRestore) { MetaState.Instance.IntentsExecutePreload(); MetaState.Instance.IntentsRemoveInvalid(); Restore(); MetaState.Instance.IntentsExecutePostload(); MetaState.Instance.IntentsRemoveInvalid(); } if (!DeferAfterSceneLoadToSubclass) { ScriptingModule.CallHooked(ScriptHook.AfterSceneLoad, this); } if (!DeferEnterAutosaveToSubclass && AutosaveOnEnter && MetaState.Instance.TransitionType != SceneTransitionType.LoadGame) { SaveUtils.DoAutoSave(); } }
public override void Start() { base.Start(); if (ConfigState.Instance.UseVerboseLogging) { Debug.Log("World Scene Controller Start"); } if (AutoRestore) { MetaState.Instance.IntentsExecutePreload(); Restore(); MetaState.Instance.IntentsExecutePostload(); } if (!string.IsNullOrEmpty(SetMusic)) { AudioPlayer.Instance.SetMusic(SetMusic, MusicSlot.Ambient, 1.0f, true, false); AudioPlayer.Instance.StartMusic(MusicSlot.Ambient); } ScriptingModule.CallHooked(ScriptHook.AfterSceneLoad, this); if (AutosaveOnEnter) { SaveUtils.DoAutoSave(); } }
/// <summary> /// Called when a scene is exiting. Should not actually exit the scene /// </summary> public virtual void ExitScene() { Debug.Log("Exiting scene: "); if (AutoCommit) { Commit(); } if (AutosaveOnExit) { SaveUtils.DoAutoSave(); } }
public virtual void Start() { Debug.Log("Base Scene Controller Start"); if (!DeferInitialRestoreToSubclass && AutoRestore) { MetaState.Instance.IntentsExecutePreload(); Restore(); MetaState.Instance.IntentsExecutePostload(); } if (!DeferAfterSceneLoadToSubclass) { ScriptingModule.CallHooked(ScriptHook.AfterSceneLoad, this); } if (!DeferEnterAutosaveToSubclass && AutosaveOnEnter) { SaveUtils.DoAutoSave(); } }