# How to import animations from one model to others

I have two models (one animation in each) which I got for free from Mixamo. I imported them in Unity and they look like this:

http://imgur.com/atjQbkI

Justin@Idle and Justin@Walking.

As can be seen from the picture, they both contain only one animation (idle and walking). But in my scene I have a couple of other character models.

But I am unable to get these two animations (idle and walking) to work on any of those models at all. (I am pretty confident that they have the same skeleton, since they are coming from the same 'pack').

What are the steps I need to do in order to get these two animations to work on every character and I can trigger them by scripting in c#?

I figured out that I need to make the .fbx rig as 'Humanoid' I suppose, but since these .fbx files don't contain the animations the Animations tab does not contain anything.

This picture shows my situation: http://imgur.com/DuTQJoK

I would like to write in my code something like this:

npcObj.GetComponent<Animation>().animation.Play("idle");


or

npcObj.GetComponent<Animation>().animation.Play("walking");


I tried adding the animations in an Animation component and calling them in script like this, but the model keeps having its T-pose.

Thanks to whoever can help me!

• I'm not able to write a complete answer at the moment, but the gist is to use the Mecanim system instead of Legacy animation: create an Animation Controller, make the animation fbx a state in the controller, and then assign that controller to your model. – jhocking Jan 2 '15 at 18:41