Hi, I have a question , How can I phrase this in conditional form on spine unity using skeletonanimation.
upon the completion of animationA, play this animationB next.,
Thanks much in advance
Hi, I have a question , How can I phrase this in conditional form on spine unity using skeletonanimation.
upon the completion of animationA, play this animationB next.,
Thanks much in advance
SkeletonAnimation skeletonAnimation = ...
skeletonAnimation.AnimationState.SetAnimation(0, "animationA", false);
skeletonAnimation.AnimationState.AddAnimation(0, "animationB", false, 0);
See the docs here:
Applying Animations - Spine Runtimes Guide: AnimationState API
AnimationState setAnimation
AnimationState addAnimation
spine-unity Runtime Documentation
There are multiple ways to accomplish this, but the easiest, by far, is this...
skeletonAnimation.AnimationState.AddAnimation(trackIndex, "run", true, 2);
You can call that directly after your "SetAnimation" call.
skeletonAnimation.AnimationState.SetAnimation(trackIndex, "walk", true);
"SetAnimation" will set the track selected to the animation you want, while "AddAnimation" will queue that animation on that track.
Whoops, Nate beat me to it.
Hehe sorry! :nerd: Thanks for helping though!
Thank you for the solutio, it worked!
So apparently hwever, I decided to get back to spine mecanim because I found out a fix on mecanim's animation transitions not looking right which is as simple as keying the last pose of every animation in spine. My C# language reading and comprehension is comparable to an 8 yr old child so until polish my skill on coding I think Ill go first with Mecanim style because for me it's quite more viewer friendly.
I appreciate all the reply and time for helping me
more power to you!
thanks!
Thank you for the solutio, it worked!
So apparently hwever, I decided to get back to spine mecanim because I found out a fix on mecanim's animation transitions not looking right which is as simple as keying the last pose of every animation in spine. My C# language reading and comprehension is comparable to an 8 yr old child so until polish my skill on coding I think Ill go first with Mecanim style because for me it's quite more viewer friendly.
I appreciate all the reply and time for helping me
more power to you!
thanks!