Freeze Animation in Unity

Stop the security camera animation.

Rusben Guzman
Dec 21, 2021

Objective: make a script to stop the security camera animation when the player is caught.

In this case a just went to the security camera script, declared a variable to get the reference to the animator component and added a line in the coroutine to set the value of the properti “enabled” as false. This makes the animator stop completely so the animation is going to freeze.

And that’s it!!! When the player reaches the security camera it stops.

--

--

Rusben Guzman

A Software Engineer passionate about game dev and interactive products with Unity. I consider video games to be the artistic expression of programming.