Majicpanda

SpineBoyController and BasicPlatformerController use different methods to set the current active animation.

What's the best and most updated version of ways to do things?

Platformer for example uses skeletonAnimation.AnimationName = animName
Spineboy uses skeletonAnimation.state.SetAnimation(0, anim, loop);

In the Platformer version is there somewhere that is defining if the animation loops or not since it's not passed in?
Majicpanda
  • Mesajlar: 197

Mitch

Even my Hitman and Gunman characters mostly use AnimationName heh. Gunman uses some fancy stuff for dealing with equipping/setup states and aim/shoot though.
Kullanıcı avatarı
Mitch

Mitch
  • Mesajlar: 978

Majicpanda

How does using .AnimationName tell the animator to loop or not? I guess that's the small part I'm not seeing. Right now I'm making a list of my animations that loop and if contains , set the SkeletonAnimator loop = true prior to setting the animation which seems bad ;)
Majicpanda
  • Mesajlar: 197

Mitch

SkeletonAnimation. Not SkeletonAnimator.

I think I just set the public loop flag to true when I want looping stuff.

But yes, in order to keep the "Unity Model" we should incorporate the LoopType param somewhere in the import / ingest system.
Kullanıcı avatarı
Mitch

Mitch
  • Mesajlar: 978

ciaps

Hi Majicpanda and Mitch,

where do I find a documentation for this usage of AnimationName?

In the official documentation http://esotericsoftware.com/spine-using-runtimes#Animation-changes I can only see a parameter AnimationName to be passed to a method called "FindBone", but nothing related to setting animations.
Kullanıcı avatarı
ciaps
  • Mesajlar: 21


Dön Unity