hello all,
Working with a game, level, scores everything under a single script controlled via other small js script. There is lot of trigger events.
So, want to know is there any unity base class or function to PAUSE THE GAME. i am just wondering if that could be having by calling that function it freezes the game and continue to unfreeze.
or the simple script without messing with the current scripts.
thanks
The problem is, if the engine would be completely paused - how could a user unpause? You would still need to display your pause menu, maybe there is animation in your pause menu, etc. So a generic solution probably wouldn’t work.
You can pause the physics engine by setting Time.timeScale to 0. FixedUpdate functions will also not be called, but Update functions will. If you want to do fps-indepent things in your Update function (for instance, I fade in my pause menu), you will have to calculate the deltaTime yourself, as far as I know.
Hope this helps.