private IEnumerator SwitchCoroutine() { do { yield return(StartCoroutine(SceneRoot.LoadSceneCoroutine(sceneList[sceneIndex], SceneLoadCallback))); sceneIndex = (sceneIndex + 1) % sceneList.Count; yield return(new WaitForSeconds(delayTime)); } while (true); }
private void SceneLoadCallback(SceneRoot sceneRoot) { if (activeScene != null) { activeScene.StopScene(); activeScene.UnloadScene(); } activeScene = sceneRoot; activeScene.StartScene(false); }