sarahnorthway

Apologies, this seems basic but I can't find a tutorial for it.

I have an AnimatorController (Mecanim) with animations for up/down/left/right idle and run plus some extras. Relationships between the states; transitions, conditions, exit times etc are final. I just need to replace the temp animations with Spine animations.

I've been given 4 sets of .atlas, .json, .png files exported from Spine: one for up, one for down, left, right. They contain 4 different skeletons with different part names. I need to combine all of this into the single AnimatorController, swapping to the correct facing skeleton when the character changes direction.

What is the best practice way to do this?

Thank you!
sarahnorthway
  • Сообщения: 4

Harald

No need to apologize.

What you want to accomplish, switching skeletons instead of animations, is unfortuantely not possible from Mecanim. This can be compared to switching a 3D model, which is also not possible via a Mecanim statemachine - Mecanim can just be used to switch between animations.

You can however show and hide attachments via Spine animations. So the bst way is to ask your artists or animators to create a single skeleton with multiple animations.

Another solution using your multiple separate skeletons would require one Mecanim statemachine per skeleton (so four SkeletonMecanim objects), which is feasible as well, but not as comfortable.
Аватара пользователя
Harald

Harri
  • Сообщения: 950

sarahnorthway

Thanks! I'll talk to my artist and sort this out on the Spine side.
sarahnorthway
  • Сообщения: 4


Вернуться в Unity