
Working with Animation Clips
Tutorial
·
Beginner
·
+10XP
·
20 mins
·
(7)
Unity Technologies

In this tutorial, you will learn how to set up animation clips in Unity after they have been imported from an external application, such as Maya, 3ds Max, or Blender, via an FBX file.
1. Setting up the Rig
3D characters will most likely have a rig — a set of bones that drives the animations. The Import Settings will allow a user to determine which Animation Type the rig will use: Generic or Humanoid.
- Once the character has been imported into Unity, select it in the Project window
- In the Inspector, select the Rig tab
- Change the Animation Type to Generic or Humanoid
The Generic Animation Type is best used for characters that have very specific rigs that cannot be used on other characters, such as creatures. The Humanoid Animation Type is used for humanoid characters. It’s especially useful when animations have to be used across multiple characters.
- Set the Avatar Definition to ‘Create from this Model’
- Set the Root Node. The word ‘Root’ is typically in the name
- Enable Optimize Game Objects and press Apply (Figure 01).

- Select the animation files for the character in the Project window
- In the Inspector, select the Rig tab
- Change the Animation Type to match the character rig settings from the previous steps
- Set the Avatar Definition to ‘Copy from Other Avatar’
- Click on the radio button next to Source
- Choose the Avatar Definition that was created from the previous steps and press Apply (Figure 02).

2. Setting up Animation Clips
Now that the rig has been set up, it’s necessary to set up the Animation Clips. Typically, users will determine if the animation should loop, as well as how the root of the Animation Clip is aligned to the character rig. When using the Generic Animation Type, setting up the root isn’t necessary because the Animation Clips were created for a specific model. If the character Animation Type is set to Humanoid, the root must be set up, especially if the user is using animations that weren’t created specifically for the character being used in the project. Using the Humanoid rig is common, especially if the animations were purchased from the Asset Store.
- Select the animation files for the character in the Project Window.
- In the Inspector, select the Animation tab (Figure 03)

- Rename the Animation Clip to something that describes the animation (Figure 04).

- If the animation is a looping animation, like a walk cycle, ensure that “Loop Time” is enabled (Figure 05).

- In the “Root Transform” parameters, enable Bake Into Pose to ensure the first and last frames of the Animation Clip match (Figure 06).

- Set the Based Upon parameter to the proper setting using the dropdown list. (Figure 07).

- Press Apply.
- Press the Play button in the Editor to preview the animation.
3. Creating Animation Clips
Characters are not the only thing in Unity that can have animations. In fact, almost any GameObject can be animated using the Animation window.
- In the Menu Bar, select Window > Animation
- Dock the Animation window next to the Project window by dragging and dropping it (Figure 08).
- Select the GameObject you desire to animate in the Scene View
- In the Animation Window, press the Create Animation Clip button. (Figure 08)

- Save the Animation Clip somewhere in the project directory
- Press the Record button in the Animation window (Figure 09).

- Move the Time Slider to the desired frame location
- Use the Move, Rotate, or Scale tool to create a Keyframe at the location of the Time Slider (Figure 10).

- When finished animating, turn off the Record button.
Animations can come from external software like Maya, 3ds Max, or Blender and simple animations can be created in Unity. Try creating a custom animation on a GameObject in your own scene.