private IEnumerator AsyncLoadOtherScene() { string sceneName = GetSceneName(EnumSceneType.LoadingScene); AsyncOperation oper = Application.LoadLevelAsync(sceneName); yield return(oper); //message send if (oper.isDone) { // GameObject go = GameObject.Find("LoadingScenePanel"); // LoadingSceneUI loadingSceneUI = go.GetComponent<LoadingSceneUI>(); // BaseScene scene = CurrentScene; // if(null != scene){ // scene.CurrentSceneId = ChangeSceneId; // } //检测是否注册该场景 if (!SceneManager.Instance.IsRegisterScene(ChangeSceneId)) { Debug.LogError("没有注册此场景:" + ChangeSceneId.ToString()); } // LoadingSceneUI.Load(ChangeSceneId); // LoadingSceneUI.LoadCompleted += SceneLoadCompleted; } }
public string GetSceneName(EnumSceneType _sceneID) { if (dicSceneInfos.ContainsKey(_sceneID)) { return(dicSceneInfos[_sceneID].SceneName); } Debug.LogError("This Scene is not register! ID: " + _sceneID.ToString()); return(null); }
public SceneInfoData GetSceneInfo(EnumSceneType _sceneID) { if (dicSceneInfo.ContainsKey(_sceneID)) { return(dicSceneInfo [_sceneID]); } Debug.LogError("This Scene hasn't registen! ID: " + _sceneID.ToString()); return(null); }
public SceneInfoData GetSceneInfo(EnumSceneType _sceneId) { if (dicSceneInfos.ContainsKey(_sceneId)) { return(dicSceneInfos[_sceneId]); } Debug.LogError("This Scene is not register ! ID: " + _sceneId.ToString()); return(null); }
internal BaseScene GetBaseScene(EnumSceneType _sceneType) { Debug.Log(" GetBaseScene sceneId = " + _sceneType.ToString()); SceneInfoData sceneInfo = GetSceneInfo(_sceneType); if (sceneInfo == null || sceneInfo.SceneType == null) { return(null); } BaseScene scene = System.Activator.CreateInstance(sceneInfo.SceneType) as BaseScene; return(scene); }
public SceneInfoData GetSceneInfo(EnumSceneType _sceneID) { if (dicSceneInfos.ContainsKey(_sceneID)) { return(dicSceneInfos[_sceneID]); } Debug.LogError("This Scene is not register! ID:" + _sceneID.ToString()); return(null); }
internal BaseScene GetBaseScene(EnumSceneType _sceneType) { Debug.Log("GetBaseScene sceneId = " + _sceneType.ToString()); SceneInfoData sceneInfo = GetSceneInfo(_sceneType); if (sceneInfo == null || sceneInfo.SceneType == null) { return(null); } BaseScene scene = System.Activator.CreateInstance(sceneInfo.SceneType) as BaseScene; return(scene); //BaseScene scene = Game.Instance.GetBaseScene(Game.Instance.ChangeSceneId); //Game.Instance.CurrentScene = scene; //scene.Load(); }