How to pause the game but keep an animation of a game object running?

So I want to pause the game when the character dies(game over) but I want to continuously loop his death animation until the user decides to restart the game. Setting Time.timeScale to 0 is obviously not the answer. Then I saw this 2009 thread and I think @Jerrod Putman’s answer will help me How do I pause my game? - Questions & Answers - Unity Discussions

If you set Time.timeScale to 0, yet you still want to do some processing (say, for animating pause menus), remember that Time.realtimeSinceStartup is not affected by Time.timeScale. You could effectively set up your own “deltaTime” in your animated menus by subtracting the previous recorded Time.realtimeSinceStartup from the current one.

But I just couldn’t understand how to implement it.

In your animator there’s a dropdown called “Update Mode”, setting it to “Unscaled Time” should fix your problem