- Home /
Set Timescale to 0 for game, except for pause menu
Hi!
The past few day's I've been working on a pause menu for my game. It's just a prefab that sits in the hierarchy, and gets enabled when a player presses esc (and when it made sure you're not in any other kind of menu). That's all working great, no questions there.
However, i'd like to make the Timescale of the game go 0. This also disabled all animations in my pause menu. Is there a way to have my pause menu on regular timescale, and the rest of the game at 0? Or is there any other way I could achieve this?
Hope someone can help me!
Answer by raxashafique · Nov 23, 2021 at 10:18 PM
In your Animator component look for Update Mode option and select Unscaled Time. Like this :
Also a quick YouTube video: https://www.youtube.com/watch?v=82MgDp8b_ms
Didn't know about this, works like a charm! Thanks so much!
Answer by Lenny991 · Nov 22, 2021 at 05:01 PM
You can adjust the Time.timeScale which should do all that.
here is a little tutorial made by brackeys with more details on that
Yeah i get that, however this freezes the timescale of the entire game. I'm playing animations in my pause menu, so these freeze aswell. Therefore, is there a way to freeze the game, but have the pause menu play?