/// <summary> /// 重置环境 /// </summary> IEnumerator doReset() { svrManager.SetOverlayFade(SvrManager.eFadeState.FadeOut); yield return(new WaitUntil(() => svrManager.IsOverlayFading() == false)); svrManager.Shutdown(); yield return(new WaitUntil(() => svrManager.Initialized == false)); SceneManager.LoadScene(sceneIndex); System.GC.Collect(); }
IEnumerator HandleBackButton() { svrManager.SetOverlayFade(SvrManager.eFadeState.FadeOut); yield return(new WaitUntil(() => svrManager.IsOverlayFading() == false)); // Load next scene in build settings, quit when done if (++sceneIndex < SceneManager.sceneCountInBuildSettings) { svrManager.Shutdown(); yield return(new WaitUntil(() => svrManager.Initialized == false)); SceneManager.LoadScene(sceneIndex); System.GC.Collect(); } else { sceneIndex = -1; Application.Quit(); } }