Answers for "quit game restart unity"

3

unity how to stop the game

The most convenient method for pausing the game in Unity is by setting the game’s time scale to zero (Time.timeScale = 0), which effectively pauses all time based operations including movement, physics and animation. Setting the time scale to one again will return the game to its normal speed.
Posted by: Guest on June-30-2021
0

restart level unity

void RestartLevel() //Restarts the level
{
  	SceneManager.LoadScene(SceneManager.GetActiveScene().name); 
}
Posted by: Guest on November-04-2021

Browse Popular Code Answers by Language