Animation clips
Add an animation clip to change your object's properties or movements over time.
Read time 3 minutesLast updated 5 months ago
Animation clips and keyframes
An animation clip is a reusable asset that records changes for an object over time, including:
- Position, rotation, and scale.
- Component properties like material color, light intensity, and visibility.
Keyframes record the values of these properties at specific times, and Unity Studio interpolates between the keyframes to create smooth motion. During playback, the clip's keyed properties drive the properties of any object you assign the clip to.
You can also import animation clips that are embedded in other assets. For example, a character mesh with a walk cycle animation or a vehicle model with movement sequences.
For instructions on how to import animations, refer to Import Animations.
Add an animation clip to an object
When you add an Animation component to an object and select Add (+), the component automatically creates a new animation clip for that object.
You can also assign different animation clips to the object instead. There are multiple ways to assign other clips in the Animation component:
- Drag an animation clip from the Project panel into the Animation field.
- Select the circle icon next to the Animation field and choose your preferred clip.
Use the Animation component to change how the animation clip plays (autoplay, looping, and more).
Access your animation clips
When you create an animation clip, Unity Studio saves the clip in the folder (in the Project panel). You can also sort them into your own folders within the folder for further asset management.
My AssetsMy AssetsWhen you import an asset with embedded animations, each clip appears under the asset as an animation clip in .
My AssetsThese embedded clips are read-only in the Project panel and you can't edit them directly. Refer to Import Animations for instructions on how to work with embedded clips.
Edit your animation clips
You can access your animation clip's settings in 2 ways:
- Select the animation clip in your folder.
My Assets - If your clip is already in the scene, select the Animation component that contains your animation clip.
Both options give you access to the following animation clip settings:
Property | Description |
|---|---|
| Easing | Changes the speed of your animation to make the movement feel more natural.
|
| Playback options | Control what happens when your animation reaches the end.
|
The Animation component provides more settings and the ability to open the Animation Timeline window, where you can adjust the animation clip's keyframes and timing. For instructions, refer to Animate a GameObject with the Animation component.
Reuse your animation clips
You can assign the same animation clip to multiple GameObjects. Any keyframes the clip has applies to every target - for example, if the keyframes change material color, it affects the material color of all the objects with the clip assigned. If any object doesn't have a material, the clip ignores those keyframes.
It's recommended to use them on objects with similar hierarchies. For example, you can create a door opening animation to cover all door objects.
Rename your animation clips
When you create an animation clip, Unity Studio gives the clip a default name. Rename your files to make them easier to identify and make it easier to reference your clips.
You can rename your clips in 2 ways from the folder (or the folder you stored the clip in):
My Assets- Right-click the clip and select Rename.
- Select the name of the clip and edit the name.
Control your animations in Logic scripts
You can use Logic scripts to access and alter your animation's settings during Play mode. This is useful if you want to play, pause, or loop your animations when an event fires. For example, play a door opening animation when the script detects that the user clicked a door object.
For an animation Logic script example, refer to Trigger an animation with a key press.
Use a button to control your animations
You can assign behaviors to UI buttons so they play, pause, or stop your animations when the user interacts with them. For instructions, refer to Trigger button animations.
Limitations of animation clips
Currently, you can't import animation clips. You can only create them using Unity Studio's animation tools.