Animator Component

Just as we added an Animation Component and were able to edit it from the Animation window, we need to be able to edit the Animator Controller as well. First we need to have the Animator Component attached to our GameObject, in this case our player character. With the Player GameObject selected, under Add Component, select Miscellaneous and then Animator (Figure 6.9). We can now assign the Animator Controller for our player.

Image

Figure 6.9 The Animator Component for our player character

The Animator Component links the Animator Controller to the character, meaning you could use the animations and behaviors on different types ...

Get Learning 2D Game Development with Unity®: A Hands-On Guide to Game Creation now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.