IEnumerator FadeWait(int sceneIndex) { float fadeTime = fade.BeginSceneFade(1); fade.BeginAudioFade(1); yield return(new WaitForSecondsRealtime(fadeTime)); SceneManager.LoadScene(sceneIndex); }
IEnumerator FadeWait(int sceneIndex) { float fadeTime = fade.BeginSceneFade(1); fade.BeginAudioFade(1); yield return(new WaitForSecondsRealtime(fadeTime)); Time.timeScale = 1; }