Animation Clip

We need to assign an Animation Clip to the Animation Component in order for it to animate our Player GameObject. But first we have to create that animation:

1. In the Project Browser under the _animations folder, right-click and choose Create > Animation.

2. Name the Animation Clip “Player_Idle.”

3. In the Animation Component for our player, click the target next to the Animation reference. This will open the AnimationClip window.

4. Select the Player_Idle clip we just created. Tap the Enter (Return) key to assign the clip and close out of the AnimationClip window.

We have assigned the Animation Clip, but it currently does not contain animation frames. Let’s take a look at the Animation window for editing our Animation Clips and ...

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.