public void DoPause() { isPaused = true; Time.timeScale = 0; //Set time.timescale to 0, this will cause animations and physics to stop updating if (!gameTitle.Abort) //if game title animation is playing { gameTitle.AbortEverything(); //stop playing the animation UnPause(); //unpause to let main menu work } else //if no title animation is playing { pauseMenu.SetActive(true); //just show the pause menu for current scene } }