Samuelb

Hi

I'm making a SpaceInvader-like game at school and currently trying to add Animations to my player (using Spine animations obviously). I've run into some problems when trying to access the SkeletonAnimator script, in my own script. What i'm trying to do is change the animations from "idle" to "running" on movement.
Similar to this:
http://answers.unity3d.com/questions/577544/which-code-do-i-use-to-change-animation-of-spine-n.html

For some reason unity won't recognize "skeletonAnimator", and will suggest using an interface "ISkeletonAnimator" instead.


Screenshot to clarify what i mean:
https://snag.gy/yxU2YL.jpg

I read through this manual "How to use SkeletonAnimation for beginners" and that method doesn't seem to work.(out of date?)
http://esotericsoftware.com/spine-unity

I'm using the version 5.1.3f1 of unity at the moment. I'm pretty sure i have the latest versions of Spine-csharp and Spine-unity.
Spent the last 4 hrs searching online for similar problems, no one seems to have a similar issue. :bang: Is there something obvious i'm missing? If there is any additional info i can give to help figuring out this i'll post them later on request.

thanks in advance! :)
-Samuelb
Samuelb
  • Сообщения: 2

Pharan

SkeletonAnimator vs SkeletonAnimation
These are two different things.

For most Spine runtimes, you use SkeletonAnimation and AnimationState.
When you use SkeletonAnimation, you use the Spine.AnimationState API and that's detailed in the Spine documentation.

SkeletonAnimator was some time ago specifically for people who were very experienced with Unity and strongly preferred sticking the ready-made solution they knew which was Mecanim. If for some reason, you are more comfortable using Unity Mecanim and want to use that, you use SkeletonAnimator. In that case, you would control animations like you would in Mecanim.

If you don't understand Mecanim and its workflow and quirks and bugs, you either need to learn it through Unity tutorials and through normal use, or just use SkeletonAnimation.
Аватара пользователя
Pharan
  • Сообщения: 5366

Samuelb

Thanks for your quick response! I guess i'll give mecanim a try, cheers. :handshake:

-Samuelb
Samuelb
  • Сообщения: 2


Вернуться в Unity