protected override void OnEnter() { CutsceneSequencePlayer.PauseCurrentCutscene(); _UnloadAndGameLoadState = UnloadAndGameLoadState.start; _SetActive = false; mStop = false; _SceneLoadEvent.RegisterEvent(C_EnumEventChannel.Global, "UnloadAndSceneLoadEvent", (object[] result) => { UnloadAndSceneLoadEvent(result); }); _MainSceneLoadEvent.RegisterEvent(C_EnumEventChannel.Global, "MainSceneLoadEvent", (object[] result) => { MainSceneLoadEvent(result); }); //if (string.IsNullOrEmpty(oldScenName)) //{ // C_DebugHelper.LogError("scenename is null"); // return; //} // Game_Minor.G_MinorCoreConfigData.SetGameCoreName(newScenName, NextStorySceneName); string sceneName = string.Empty; if (newApi) { // string sceneName = Game_Minor.G_MinorCoreConfigData.GetLoadNextSceneName(); if (string.IsNullOrEmpty(uiName)) { SceneLoadingMgr.GetInstance().PreUnloadSceneAndLoadNewSceneAsync(oldScenName, sceneName, loadConfig, () => { LoadOver(); }); } else { SceneLoadingMgr.GetInstance().PreUnloadSceneAndLoadNewSceneAsync(oldScenName, sceneName, loadConfig, () => { LoadOver(); }, uiName); } } else { if (string.IsNullOrEmpty(uiName)) { SceneLoadingMgr.GetInstance().PreUnloadSceneAndLoadNewSceneAsync(oldScenName, newScenName, loadConfig, () => { LoadOver(); }); } else { SceneLoadingMgr.GetInstance().PreUnloadSceneAndLoadNewSceneAsync(oldScenName, newScenName, loadConfig, () => { LoadOver(); }, uiName); } _ActiveSceneName = newScenName; } }
protected override void OnEnter() { if (string.IsNullOrEmpty(mainScenName)) { Debug.LogError("scenename is null"); return; } CutsceneSequencePlayer.PauseCurrentCutscene(); mStop = false; if (string.IsNullOrEmpty(uiName)) { SceneLoadingMgr.GetInstance().PreLoadMulitSceneAsync(mainScenName, otherSceneName, loadConfig, () => { Back(); }); } else { SceneLoadingMgr.GetInstance().PreLoadMulitSceneAsync(mainScenName, otherSceneName, loadConfig, () => { Back(); }, uiName); } }
protected override void OnEnter() { if (string.IsNullOrEmpty(oldScenName)) { Debug.LogError("scenename is null"); return; } CutsceneSequencePlayer.PauseCurrentCutscene(); Resources.UnloadUnusedAssets(); mStop = false; if (string.IsNullOrEmpty(uiName)) { SceneLoadingMgr.GetInstance().PreUnloadSceneAndLoadNewSceneAsync(oldScenName, newScenName, loadConfig, () => { Back(); }); } else { SceneLoadingMgr.GetInstance().PreUnloadSceneAndLoadNewSceneAsync(oldScenName, newScenName, loadConfig, () => { Back(); }, uiName); } }
protected void CloseUI() { SceneLoadingMgr.GetInstance().CloseUI(); }