Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(1 edit)

When you pause a game if you use Unity you set the TIme.deltaTime =0f; just add in the menu script on void Start {Time.deltaTime =1f;} this works only in unity

can you give me an example where you restart the game entirely instead of just unpausing time because I don't want the player to return and then play and continue their progress.

Just seen this...

Okay so you want to have "using UnityEngine.SceneManagement;" at the top of your script.

To restart the active scene: SceneManager.LoadScene(SceneManager.GetActiveScene().name);

To load a different scene in: SceneManager.LoadScene(scenenumber); where you find the order of the scenes in the build settings. You may need to add active scene to the build list, but that's just one button click at the bottom right of the box where you're ordering the scenes