/// <summary> /// go to next scenes /// </summary> /// <param name="scenesEnumName">scenes enum names</param> protected void EnterNextScenes(ScenesEnum scenesEnumName) { //turn to logon scenes //you have add level one on ScenesEnum dictionary GlobalParaMgr.NextScenesName = scenesEnumName; SceneManager.LoadScene(ConvertEnumToString.GetInstance().GetStrByEnumScenes(ScenesEnum.LoadingScenes)); }
//异步加载场景 IEnumerator LoadingScenesProgress() { //用于接受异步加载场景的参数 _AsyOper = SceneManager.LoadSceneAsync(ConvertEnumToString.GetInstance().GetStrByEnumScenes(GlobalParameterManager.NextScensName)); _ProgressNumber = _AsyOper.progress; yield return(_AsyOper); }
//Asynchronous loading IEnumerator LoadingScenesProgress() { //_AsyOper = SceneManager.LoadSceneAsync("2_LogonScenes"); _AsyOper = SceneManager.LoadSceneAsync(ConvertEnumToString.GetInstance().GetStrByEnumScenes(GlobalParaMgr.NextScenesName)); _FloProgressNumber = _AsyOper.progress; yield return(_AsyOper); }
private GameObject lockCamera; //跟随主角移动的摄像机 //进入下一个场景 protected void EnterNextScenes(ScenesEnum scenesEnumName) { GlobalParameterManager.NextScensName = scenesEnumName; SceneManager.LoadScene(ConvertEnumToString.GetInstance().GetStrByEnumScenes(ScenesEnum.LoadingScenes)); }