How can I Play my UI's Spine animations with Sequence command?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
robster21
Posts: 38
Joined: Tue Aug 23, 2022 9:02 am

How can I Play my UI's Spine animations with Sequence command?

Post 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?
Attachments
WhatComponentShouldIAdd.PNG
WhatComponentShouldIAdd.PNG (53.91 KiB) Viewed 2377 times
User avatar
Tony Li
Posts: 22144
Joined: Thu Jul 18, 2013 1:27 pm

Re: How can I Play my UI's Spine animations with Sequence command?

Post by Tony Li »

Hi,

I'll look into extending the SpineAnimation() sequencer command so it can also work with SkeletonGraphics.
User avatar
Tony Li
Posts: 22144
Joined: Thu Jul 18, 2013 1:27 pm

Re: How can I Play my UI's Spine animations with Sequence command?

Post 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
robster21
Posts: 38
Joined: Tue Aug 23, 2022 9:02 am

Re: How can I Play my UI's Spine animations with Sequence command?

Post by robster21 »

Woooooow.... It works!!
Thank you always for your answer! :D :D :D :D
robster21
Posts: 38
Joined: Tue Aug 23, 2022 9:02 am

Re: How can I Play my UI's Spine animations with Sequence command?

Post 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.
User avatar
Tony Li
Posts: 22144
Joined: Thu Jul 18, 2013 1:27 pm

Re: How can I Play my UI's Spine animations with Sequence command?

Post 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.
robster21
Posts: 38
Joined: Tue Aug 23, 2022 9:02 am

Re: How can I Play my UI's Spine animations with Sequence command?

Post 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).
Attachments
example02.JPG
example02.JPG (71.6 KiB) Viewed 2343 times
example01.JPG
example01.JPG (49.13 KiB) Viewed 2343 times
User avatar
Tony Li
Posts: 22144
Joined: Thu Jul 18, 2013 1:27 pm

Re: How can I Play my UI's Spine animations with Sequence command?

Post 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.
Post Reply