O'Reilly logo

Unity 3D Game Development by Example by Ryan Henson Creighton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action - register the animations

The character model that we're using has been pre-animated in Blender. It has three animations: idle, step, and catch. Before we can play these animations using a 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. In the Inspector panel, scroll down to the Animations section.
  3. Make sure that Bake Animations and Split Animations are both checked.
  4. Click on the little plus icon at the right edge of the box to add three new animations.
  5. Name the animations step, idle, and catch.
  6. Use these settings for the Start, End, and WrapMode parameters:
    • step 1-12, Loop
    • idle 22-47, Loop
    • catch 12-20, Once
  7. When you are finished, click on ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required