I used Time.timeScale = 0 to simply pause the game and confronted with strange behavior. First game freezes as it should be, but after several seconds it starts play again all by itself, as if timeScale is back at 1. Seems it started when I added some animations to my game objects. I don’t understand what’s happening. I didn’t change anything in code, just added animations in editor. Anyone has an idea what it might be and how to fix it?
Some other script must be changing it, or possibly your script is behaving in a way you didn’t expect. Search for “timeScale” in your entire project folder and see if something else is using it.
If not that, then wherever you’re setting it back to 1, try adding a Debug.Log to see if that line is being executed.
1 Like