IEnumerator SceneManager.ITransition.Out() { if (transitionOut) { transitionOut.Play(); while (transitionOut.isPlaying) { yield return(null); } } else if (transitionIn) { transitionIn.Prepare(); transitionIn.isRenderActive = true; } }
IEnumerator SceneManager.ITransition.In() { if (transitionOut) { yield return(new WaitForEndOfFrame()); //wait one render transitionOut.End(); } if (transitionIn) { transitionIn.Play(); while (transitionIn.isPlaying) { yield return(null); } transitionIn.End(); } }