Example #1
0
    IEnumerator PauseCoroutine()
    {
        GamePause gamePause = canvas.GetComponent <GamePause>();

        gamePause.Pause();
        narratorTrigger.Play();
        Debug.Log(narratorTrigger.GetLength());
        yield return(new WaitForSecondsRealtime(narratorTrigger.GetLength()));

        gamePause.Resume();
        SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1);
    }