In this recipe, we will create an Animator Controller to play 2D animations of a character. Unity's animation system is using the same principles for both 2D and 3D animation clips, which makes it quite intuitive to use.
Using the Animator Controller to play sprite animations
Getting ready
First, you should have at least two sprite animations (or 2D sprite doll animations) ready. You can also go to the Chapter 03 2D and user interface animation\Recipe 04 Using the animator controller to play sprite animations directory and open the Example.unity scene. You will find an already animated Warrior game object there. If you play the game, you can use the arrow keys (left and right) to move the character. It will...