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:
https://i.stack.imgur.com/iDZ7l.jpg
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: https://i.stack.imgur.com/2cLfh.jpg
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!