Understanding what actually happens when the game is paused using this method will help you to avoid unexpected behaviour later on. Setting it to zero, pauses the game entirely. Put simply, changing the time scale from its default of one will speed up or slow the game down – for example, you can run the game at half speed with a time scale of 0.5, or twice as fast with a timescale of 2). Setting the time scale affects the time and delta time measuring variables in the Time class. In scripting it looks like this: void PauseGame () To pause a game in Unity, simply set the time scale to zero to pause it and back to one (the default) to unpause it again.
System pause not working how to#
How to pause the game in Unity (using time scale)
![system pause not working system pause not working](https://tipsmake.com/data1/images/fix-steam-game-not-running-picture-2-w54YDC6Mh.jpg)
So… what’s the best method for pausing the game in Unity? Whatever it is, the benefits of being able to freeze gameplay temporarily will be obvious to you. This might be to stop the game to display a message, to access inventory or other game settings or to simply offer a traditional pause menu to the player. If you’re making a game in Unity then, chances are, you’re going to need a way to pause it.