public void ReturnScene() { if (SceneManager.GetActiveScene().name == "GameScene") { setHighScore(); SceneManager.UnloadSceneAsync("GameScene"); } else if (SceneManager.GetActiveScene().name == "GameScene2") { setHighScore2(); SceneManager.UnloadSceneAsync("GameScene2"); } SceneManager.LoadSceneAsync("Main_Menu", LoadSceneMode.Single); ballMovement.InPlay(true); playerMovement.SetIsAi(true); scoreText.text = ""; }