protected override void SceneLoadFinished(SceneRootEntry sceneRoot) { if (sceneRoot != null && sceneRoot.IsLoaded()) { var themeLoadManager = sceneRoot.GetComponentInChildren <ThemeLoadManager>(); if (themeLoadManager != null) { LoadingLogic.AddCustomProgress(2); string levelName = SceneManager.MainLandName; themeLoadManager.LoadOTALevelAsync(levelName, levelName + ".unity.json", null, OnMainLandSceneLoadFailed, null, OnMainLandSceneLoaded); } } }
void HandleFinished(SceneRootEntry entry) { // may be destroyed, 如果进了if则会卡76% if (Equals(null)) { EB.Debug.LogError("[ThemeLoadManager].HandleFinished===> Equals(null)"); entry.DestroyLevel(); return; } if (entry.IsLoaded()) { entry.SetParent(gameObject); entry.ShowLevel(); } m_OnFinished?.Invoke(entry); }
protected override void SceneLoadFinished(SceneRootEntry sceneRoot) { EB.Debug.Log("MainLandViewAction.SceneLoadFinished=====>"); LoadingLogic.AddCustomProgress(15); if (sceneRoot != null && sceneRoot.IsLoaded()) { m_SceneRootEntry = sceneRoot; m_ThemeLoadManager = sceneRoot.GetComponentInChildren <ThemeLoadManager>(); sceneLoaded = true; LoadingLogic.AddCustomProgress(5); OnComplete(); if (m_ThemeLoadManager != null && !string.IsNullOrEmpty(MainLandLogic.GetInstance().CurrentEnvironmentName)) { string levelName = MainLandLogic.GetInstance().CurrentEnvironmentName; m_ThemeLoadManager.LoadOTALevelAsync(levelName, levelName + ".unity.json", null, OnInitSceneFailed, null, (SceneRootEntry entry) => { EB.Coroutines.Run(OnInitSceneSucced(entry)); }); } } LoadingLogic.AddCustomProgress(5); }
protected override void SceneLoadFinished(SceneRootEntry sceneRoot) { LoadingLogic.AddCustomProgress(15); UIStack.Instance.ResetNextStackDepth(); EB.Debug.Log("LoginProfile {0}", ((float)((System.DateTime.UtcNow.Ticks / 10000) % 100000) / 1000)); if (sceneRoot != null && sceneRoot.IsLoaded()) { m_SceneRootEntry = sceneRoot; m_ThemeLoadManager = sceneRoot.GetComponentInChildren <ThemeLoadManager>(); if (m_ThemeLoadManager != null) { LoadingLogic.AddCustomProgress(5); Combat_Scene_Name = GetCombatSceneName(); if (string.IsNullOrEmpty(Combat_Scene_Name)) { Combat_Scene_Name = DEFAULT_COMBAT_NAME; } m_ThemeLoadManager.LoadOTALevelAsync(Combat_Scene_Name, Combat_Scene_Name + ".unity.json", null, InitializeSceneFailed, null, InitializeScene); } InteractableObjectManager.Instance.SetParent(sceneRoot.m_SceneRoot.transform); } LoadingLogic.AddCustomProgress(10); }