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.
In the Project panel, click on the character model inside the Models folder.
At the top of the Inspector panel, click on the Animations tab.
Click on the little plus icon at the right edge of the Clips box two times, to list a total of three animations.
Click on each animation in turn and, in the following section, name the animations
step
,idle
, andcatch
.Use these settings for the Start, End, and Wrap Mode parameters:
step 1-12, Loop
idle 22-47, Loop
catch 12-20, Once
When you are finished, click on the Apply button.
Now that these animations have been named and identified, we can call them up with code.