Animating the character with Mecanim
In the Creating actor animations section, we added an Animator component to the PlayerCharacter1
object when we created the idle animation for the actor. The Animator
component allows us to assign animation to a GameObject in the Scene view – it’s the interface responsible for controlling Unity’s Mecanim animation system (on the actor or any other GameObject you’d like to animate).
An Animator Controller asset was also created in the same folder the idle animation was saved to and automatically referenced in the Controller field of the Animator
component. This controller asset defines what animations to use and when and how to transition and blend them.
Additional reading | Unity documentation
Animator: https://docs.unity3d.com/2022.3/Documentation/Manual/class-Animator.html.
To continue setup in the Animator
component, we’ll need a second animation to transition to when our player character moves or...