IEnumerator LoadNextLevelDelay() { yield return(new WaitForSeconds(5)); levelswitch.LevelSwitcher(); //SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1); }
IEnumerator UIMessageDelay() { yield return(new WaitForSeconds(4)); UImessages[0].SetActive(true); audioSource.PlayOneShot(AudioMessages[0], audioVolume); yield return(new WaitForSeconds(15)); UImessages[0].SetActive(false); levelswitch.LevelSwitcher(); //SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1); }