avemon

Just wondering, is it possible to add/run spine animations using Unity's new timeline feature?

if not, are there any plans to support this?
avemon
記事: 4

Pharan

Currently experimental. There's a big change coming up so I'd hold off using it for a week or something, if you can.

You can read about the current status here:
https://github.com/pharan/spine-unity-experimental/tree/spine-timeline/Assets/spine-unity-experimental/Spine%20Timeline/Documentation

Though you can play around with it if you want to download the experimental unitypackage.
http://esotericsoftware.com/files/runtimes/unity/spine-unity-experimental-spine-timeline-3_6-2017-11-25.unitypackage
アバター
Pharan

Pharan
記事: 5220

RemDust

:rock: This will be a very cool feature !
"I'm so exciiiiited !"
RemDust
記事: 140

Dmitriy Makeyev

Tell me how soon will release timline?
Dmitriy Makeyev
記事: 32

Pharan

It was added to the 3.6 branch on May 14.
You can try it now if you have that version.

Only the SpineAnimationState and SpineSkeletonFlip clip types are included for now since those are the types that act most predictably. (It just makes AnimationState calls to a target SkeletonAnimation's AnimationState, or flips the Skeleton)
We'll probably add a separate clip types soon for SkeletonGraphic since their types aren't reconcilable outside of sharing an interface, which currently isn't a supported property type by Unity editor.

Editor preview may not look exactly the same as at runtime, and backwards playback is not supported. We're hoping to improve things as we go though a lot of it depends on the type of exposed API Unity's Timeline and Playables feature has.
アバター
Pharan

Pharan
記事: 5220

bali33

Hello,

I was wondering if it would be possible to have multiple SpineAnimationTrack targeting the same SkeletonData ?

I tried (naively) to add a "trackIndex" property in the SpineAnimationStateBehaviour class and to use this trackIndex value inside the SpineAnimationStateMixerBehaviour class when animation is set :

line 83 : state.SetEmptyAnimation(clipData.trackIndex, mixDuration);
or
line 86 : Spine.TrackEntry trackEntry = state.SetAnimation(clipData.trackIndex, clipData.animationReference.Animation, clipData.loop);

Doing this does not work as expected. When clips overlaps their animation does not play.

Any idea how I could do this ? I have complexe spine, like a magical cauldron, in which I like to play multiple animations at the same time (tossing the liquid, bubble in the liquid, fire etc.) so it would be very useful.

Thanks

ps : when adding a SpineAnimationClip its duration in the timeline is not automatically set as the animation reference duration. Could be useful.

---

Ok, I have to apologize. It seems that it actually works in playmode, it's just from the Editor while scrubbing that it does not work. So nevermind the "request/question" part, but having the scrubbing working would be a must have :-)

Thanks
bali33
記事: 94

Pharan

I could've sworn there was a trackIndex on that thing. In any case, we'll add it.

Your edits should have been correct but the preview might not have worked as expected. It should have worked fine at run time.

There are a lot of things in the Timeline interface that aren't exposed to us. I would have preferred it if it would do things like set the animation duration automatically, and things like the clip name as well. But it's currently not possible even in the latest Unity version.
If you spot another timeline-related plugin that's able to do this even in some hacky way, let us know. We might be able to apply the same logic.

edit:
I tried it just now. It works fine. But preview doesn't work correctly, as expected.
This is because each track's mixer behavior is blind to other tracks, so it can't combine poses from two different animations in preview. It's really a limitation of Unity's current implementation.
アバター
Pharan

Pharan
記事: 5220

bali33

Are you saying that you do have the "trackIndex" property ? I did updated my Spine C# and Spine Unity yesterday and I do not have this property.

Thanks

ps : a shame we can't make the preview working as expected. I hope Uinty will remove the limitation that are stopping you to make it works. Did you tried to contact them about that ?
bali33
記事: 94

Pharan

Not yet. But we will add it in a future version.

I think It's not a matter of removing a limitation as it is working around the architecture they decided on. I don't think it'll be a small task on their part either way.
アバター
Pharan

Pharan
記事: 5220

Cranktrain

Pharan さんが書きました:I could've sworn there was a trackIndex on that thing. In any case, we'll add it.
I grabbed the version of Spine Unity earlier today and it doesn't seem like trackIndex has appeared still! It's easy enough to add in as bali33 describes though.

As someone just getting into the new Timeline feature with Spine, there are those few frustrations you have both already mentioned: not automatically setting the length, and especially viewing more than one track in Preview mode. I hope Unity works on Timeline a bit more!
アバター
Cranktrain
記事: 54

Pharan

It should be visible if you select the Timeline track item, not each clip. I forgot if it was added in the latest 3.6 or only 3.7-beta
アバター
Pharan

Pharan
記事: 5220

bali33

Be able to preview more than one track at the same time is really needed. In short it would be cool to be able to do with Timeline what we can do with Spine API, at least what is about playing animation, setting a skin etc. Spine is a really powerful tool and having the possibility to use it with Timeline is great. We usually make games with a lot of animated sequences in our games and we hope to be able to rely on Timeline + Spine in our next titles.
bali33
記事: 94

Pharan

I agree it's needed. Given the way Spine evaluates and applies animations, Unity doesn't expose the right stuff to editor code at the moment. :c
アバター
Pharan

Pharan
記事: 5220

bali33

I don't know if it can change something but I just posted on the Unity Timeline forum to share that limitation. If you want to check or add details/explanations feel free to do it : https://forum.unity.com/threads/spine-timeline-unable-to-preview-multiple-tracks-at-the-same-time.556750/

---

@pharan,

One Unity forum moderator answered to my post and ask for a small repro project and opening a bug. I think it would be more logical that you answer to that and keep in touch with him. You are way more legit than me and you know your stuff when it comes to Spine and Unity. Would you do that ?

Thanks

---

@pharan,

Sorry if I'm bothering you with that subject, but as the most expert person when it comes to Spine & Unity and having a Unity guy willing to know more about the multiple track issue I think it would be really cool if you could handle the "case" ;-)

Thanks
bali33
記事: 94


Return to Unity