public void LevelChooserBtn(string level) { if (level == "Default") { Admanager.Reset(); } SceneManager.LoadSceneAsync(level, LoadSceneMode.Single); Animator anim = loadFade.GetComponent <Animator>(); anim.SetBool("Fade", true); }
void Update() { if (SceneManager.GetActiveScene().name == "levelChooser") { if (Input.GetKey("escape")) { Admanager.Reset(); SceneManager.LoadScene("Default", LoadSceneMode.Single); } } }