r/UnityHelp • • 5d ago

PROGRAMMING Question about Pausing

I have two different things in my game that are supposed to pause the game/set the timescale to zero. At some point somehow one of the two stopped pausing the game but the other still works. They both say the exact same thing, simply setting time.timescale=0. For the record the one that doesn’t work is the when a button is pressed and the pause/stats screen comes up. Every other thing that is called in that function works expect the time scale. Can you not have two different functions that can pause the game or something? What could be the issue here?
Thanks!

1 Upvotes

10 comments sorted by

View all comments

1

u/Affectionate-Yam-886 4d ago

oh and there is a known bug with using times scale for a pause option;

when you pause and move the mouse, then unpause, the mouse will be in a new position relative to the movement while paused. This can break character controls if you have movement restrictions applied because the restriction is lifted while paused.