Jump to content
Aveyond Studios Community
Sign in to follow this  
Ant

Set up an animation for a model prefab

Recommended Posts

There are two ways you can add animation to a model prefab: attach an animation controller or attach an animation component. The animation controller is the new way in which Unity lets you create animations for your characters. The animation component is the old way. Both are still widely used, so you may have some models that use one and some that use the other.

Create an animation controller and add it to a model prefab

Spoiler

 

Follow the steps in these video tutorials to prepare a model prefab and create an animation controller for it: 

 

Create an animation component and add it to a model prefab

Spoiler
  1. Create a model prefab.
  2. Make sure the Inspector tab is visible in Unity (Windows > Inspector)
  3. In the Project tab, click on the model prefab. It's contents appear in the Inspector tab. 
  4. If the model prefab does not have a component called Animation, add this (In Inspector tab, click Add Component button and type Animation. Choose the Animation component from the resulting list of options. This adds an Animation section.
  5. In the Animation section, expand Animations. Change the value of Size from 0 to 1 (or the number of animations that the model prefab can have. Element slots are created.
  6. Drag your animation clips from the Project tab into the Element slots.
  7. Your done!

 

Share this post


Link to post
Share on other sites
Sign in to follow this  

×