Esempio n. 1
0
    IEnumerator FadeWait(int sceneIndex)
    {
        float fadeTime = fade.BeginSceneFade(1);

        fade.BeginAudioFade(1);

        yield return(new WaitForSecondsRealtime(fadeTime));

        SceneManager.LoadScene(sceneIndex);
    }
Esempio n. 2
0
    IEnumerator FadeWait(int sceneIndex)
    {
        float fadeTime = fade.BeginSceneFade(1);

        fade.BeginAudioFade(1);

        yield return(new WaitForSecondsRealtime(fadeTime));

        Time.timeScale = 1;
    }