Time for action – registering the animations

The character model that we're using has been pre-animated in Blender. It has three animations: step, idle, and catch. Before we can play these animations using Script, we have to tell Unity the frame ranges the model uses.

  1. In the Project panel, click on the character model inside the Models folder.
  2. At the top of the Inspector panel, click on the Animations tab.
  3. Click on the little plus icon at the right edge of the Clips box two times, to list a total of three animations.
  4. Click on each animation in turn and, in the following section, name the animations step, idle, and catch.
  5. Use these settings for the Start, End, and Wrap Mode parameters:
    • step 1-12, Loop
    • idle 22-47, Loop
    • catch 12-20, Once
  6. When you are finished, ...

Get Unity 4.x Game Development by Example Beginner's Guide 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.