Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

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