Pause game but not Canvas and some effect

Hello, Im trying to pause my game but i dont know how to start. The game is an FPS, and I want to pause the enemies, their shoots, and of course player movement BUT I dont want to pause the canvas, so you can use the menus, but, when you open the canvas there is your character with an idle animation, and i dont want to pause it, and the canvas has some effects too in the sprite (with materials/shaders)

How can i aboard this? THX

To pause the game you usually set Time.timeScale to 0 or if errors arise to a rediculously small value.

Unity’s UI is not affected by Time.timeScale. So, buttons, toggles, etc. all still work as you’d expect.

If you want to keep things moving that run multiplied by Time.deltaTime then it’s just a matter of replacing it with a custom deltaTime as described at the bottom of this post.

As for animations; anything animator-controlled can be released from timeScale by adding animator.updateMode = AnimatorUpdateMode.UnscaledTime; to your initializing function.