0
\$\begingroup\$

When you start with the Unity 3rd person template, you see the animations (actions) being neatly organized as separate files: 3rd Person Template

I know how to export a model with the mesh, materials, and actions: Model asset with mesh, materials, animations But how do I do it like in that Unity template (only actions)?

I'd like to be able to work independently on materials, actions, and meshes.

I tried to export only the armature and all actions (all one), but the animation is not playing in preview, nor in play mode. Even weirder, it got stuck on some pose which is not even a part of exported animation. Non-working animation

What kind of worked for me, was creating a simple cube, parenting it to the armature, and exporting the armature with that cube.

Cube model asset with idle animation

But this is a hack, which doesn't feel right.

\$\endgroup\$

1 Answer 1

2
\$\begingroup\$

Had this same exact problem yesterday. Turns out all you need to do to fix it is toggle the "Preserve hierarchy" import option on the animations asset in Unity.

Apparently, this behaviour is because when you import an asset that has a single object (the armature, in this case), unity just makes the armature the root of the hierarchy. When you have multiple objects (the armature and a mesh), neither of them can be the root, so a separate root is created that both objects are parented to. Net result is the armature+mesh asset has a different hierarchy than the armature asset, so the animations are no longer compatible.

"Preserve hierarchy" forces the importer to create a root object even if there is only one thing in the asset, so it works again.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .