- Home /
Game doesn't get paused in Release build
I'm having this issue that the game doesn't get paused when I'm playing a Release build of the game. The pause works fine while in the player, but when I do a Build and Run and try to pause the game, some of the movement stops, but physics continue to run and Update's are called on objects.
Also particle systems continue to run in Release build, but are paused in the player.
I use the Time.timeScale = 0.0f to pause the game and in the PlayerController's Update method I check if the game isPaused and return immediately if it is.
I updated from 2019.4.4f1 to 2020.1.0f1 to see if it would help, but the issue persists. It used to work with 2019.3.11f1.
Are there some settings that alter the behavior of the timeScale? It should stop FixedUpdate being called, but it doesn't seem to do so as the players are falling down and hitting the ground (the position isn't updated on screen, but I can hear the falling sound after a while).
EDIT: If I do a development build, then everything works as in the editor. I have only one #if DEBUG in the code and it's only to check the number of controllers plugged in (numberOfPlayers = controllers.Length;).