0
\$\begingroup\$

I'm having problems animating a character pack I purchased from unity asset store.

I've placed the character in an environment and created an animator controller. After I drag the animation that to the animator tab, there aren't any motions. Even if I place triggers or booleans in my script as parameters in the animator it doesn't work.

It worked with other characters but the animations were somehow embedded in the 3d models. How is this supposed to work?

\$\endgroup\$
1
\$\begingroup\$

For an animation to work in Unity you need:

1.) an Animator component assigned to your gameObject 2.) an Animation Controller asset 3.) an animation clip(s)

The Animator component needs to have the Animation Controller dragged to it's 'Controller' field in the Inspector window. An Avatar is required in the 'Avatar' Inspector field (usually autocreated on import)

Then as long as you've dragged at least 1 Animation clip to the Animation Controller state machine (and possibly set it to default so that it will play first), your gameObject should then animate in Play mode.

http://docs.unity3d.com/Manual/class-Animator.html

It's hard to tell what the issue is without more details/knowledge of the animations/screenshots etc, but make sure you have a look at the actual Animator component on the character in the Scene heirarchy and ensure none of the Inspector fields are set to 'None'. That's where I'd start at least.

\$\endgroup\$
  • \$\begingroup\$ The problem is that i added the animations to the animator controller but i can't preview them and in the motion there is no motion . it seems like i'm adding empty animations but when i drag a model to the animation (it's an fbx file ) and preview it it works . maybe i'm missing something ? even on the animator no matter how many animations i add from this pack the clip count remains zero \$\endgroup\$ – user3370608 Mar 24 '15 at 13:41
  • \$\begingroup\$ It's tough to know what the issue is as I don't know how the animations were imported into Unity etc. Are they seperate .fbx files? Are they compatible with Mechanim or do they use the old Legacy system? (which could account for them not working in the Animation Controller but instead working in the general preview window etc). \$\endgroup\$ – DanoThom Mar 24 '15 at 16:38
  • \$\begingroup\$ Well in the package that i purchased i have the animations stored into a folder named animations Legacy . the animations are seperated .fbx files . and if i click on one and then select animations tab i can drag a model and preview the animation and it seems that it is working .but if i drag it to the animation controller it seems to be not there or empty \$\endgroup\$ – user3370608 Mar 24 '15 at 18:26
  • \$\begingroup\$ If you purchased the package from the Asset Store, you should definitely pose these questions to the creator. In Unity 4+ with Mecanim your animation needs to have both a compatible skeletan rig for the Avatar as well as the proper muscle definition. If the models + anims you purchased aren't compatible with Mecanim, then you're out of luck unless you have the skill to make the necessary ammendments in Blender etc and then reimport. \$\endgroup\$ – DanoThom Mar 27 '15 at 10:08
0
\$\begingroup\$

This is caused by the fact that the animations are set to 'Legacy', click on the animation clip, in the very top right of the inspector click the three lines with a down arrow on the left of them, click Debug, Untick Legacy, click drop down again and click Normal, Re-drag animations into your Animator Controller, job done

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.