private void OnTriggerEnter2D(Collider2D collision) { if (collision.gameObject.tag == "Player") { string scene = SceneManager.GetActiveScene().name; SkillLearned.SetPrevStage(int.Parse(scene.Substring(5))); SceneManager.LoadScene("SkillsLearned"); } }
public void ButtonNo() { Time.timeScale = 1; SkillLearned.SetPrevStage(int.Parse(SceneManager.GetActiveScene().name.Substring(5))); SceneManager.LoadScene("TitleScene"); }