private IEnumerator Transition(string key) { if (!this.transitionsByKey.ContainsKey(key)) { this.EmptyTransition(); Debug.LogWarning("Could not find transition definition for " + key); yield break; } SceneTransitionDefinition transition = this.transitionsByKey[key]; yield return(this.runner.StartCoroutine(transition.Load(this.runner))); }
private void EmptyTransition() { string currentScene = SceneManager.GetActiveScene().name; this.previousScene = emptyIdentifier; this.currentScene = currentScene; string emptyKey = SceneTransitionDefinition.CreateKey(this.previousScene, this.currentScene); if (!transitionsByKey.ContainsKey(emptyKey)) { Debug.LogError("EmptyTransition not assigned to " + this); return; } this.Transition(); }
private void Transition() { IEnumerator routine = this.Transition(SceneTransitionDefinition.CreateKey(this.previousScene, this.currentScene)); this.runner.StartCoroutine(routine); }