• Unity
  • Unity animation, loops and events

  • Изменено
Related Discussions
...

Hi,

I've an annoying issue:

Events put in spine animation and baked in unity animator work fine.
But on a loop animation, the events are only sent the first time (when the animation loop, the event are not sent anymore). Then if I play another animation and re-play the first (looping) one, events are sent, but only the first loop.

Is there a way to correct that? I did not find anything on the forum.

Thanks

baked?

That means it's totally outside of Spine's system at that point. Events there are turned into plain Unity Animation Events.
So if there's a bug there, it's a Mecanim quirk.

Even if it was SkeletonAnimator, they're still Unity Animation Events. Still Mecanim implementing events/messaging.

Ok, it was not spine related.

For those who have similar problems :

I use a animatorOverrideController. if the the animation are set as looping in the global animator animations but not in the override animations, the animations will loop but the event are not sent after the first loop.
So the animation in global animator AND override animations need to be marked as "loop".

By the way, is there a way in spine to export animation as "looping"? and directly mark them in spine editor? So in unity its set as looping when baked.

Thanks for sharing! I'm sure that'll be helpful to other users.

No, there's currently no way to mark looping animations in Spine. I think that's a good idea though.