Page 1 of 1
How can I Play my UI's Spine animations with Sequence command?
Posted: Tue Aug 30, 2022 10:16 am
by robster21
I want to play the animation of UI's Spine Animations.(This UI is not a subtitle panel.)
when I put it into the game with normal Game Object, the SpineAnimation ( ); command works well. However, It does not work when it's on UI(with the SkeletonGraphic(Unity UI Canvas) component).
How can I play It's animations with the SpineAnimation(); command?
Re: How can I Play my UI's Spine animations with Sequence command?
Posted: Tue Aug 30, 2022 1:18 pm
by Tony Li
Hi,
I'll look into extending the SpineAnimation() sequencer command so it can also work with SkeletonGraphics.
Re: How can I Play my UI's Spine animations with Sequence command?
Posted: Tue Aug 30, 2022 8:15 pm
by Tony Li
Hi,
This updated package (which will also be in version 2.2.31) extends the SpineReferences component so you can assign a SkeletonGraphic and use it with the SpineAnimation() sequencer command.
DS_SpineSupport_2022-08-30.unitypackage
Re: How can I Play my UI's Spine animations with Sequence command?
Posted: Tue Aug 30, 2022 9:44 pm
by robster21
Re: How can I Play my UI's Spine animations with Sequence command?
Posted: Wed Aug 31, 2022 12:45 am
by robster21
And Hi again,
Can I play the Spine Animations of the UI(Skeleton Graphic component contained)with the Skeleton Mechanim and Animation Controller?
I tried with AnimationPlay(); and AnimationTrigger(); Sequence commands, but they didn't work.
My problem is already solved, but I am curious about that.
Re: How can I Play my UI's Spine animations with Sequence command?
Posted: Wed Aug 31, 2022 7:54 am
by Tony Li
If your Spine character uses a regular Mecanim animator controller, you should be able to use AnimatorPlay(), AnimatorPlayWait(), AnimatorTrigger(), etc., on it.
Re: How can I Play my UI's Spine animations with Sequence command?
Posted: Wed Aug 31, 2022 10:36 am
by robster21
Ah, When I attach the "Skeleton Graphic component" and "Animator component" on UI game object, and place it on the Canvas, then the AnimationPlay();... etc. commands not works.
It works when I remove "Skeleton Graphic component" and move it to out of the Canvas.
However, the Animation Controller appears that the Animation is playing(Please look at the image).
Re: How can I Play my UI's Spine animations with Sequence command?
Posted: Wed Aug 31, 2022 10:39 am
by Tony Li
That makes sense. SkeletonMecanim is the version of the Spine character that can be controlled by a Mecanim Animator. You wouldn't also want a SkeletonGraphic version on the same GameObject.