- Düzenlendi
Spine 4 Timeline Extension - Pausing at end of track
Testing more things out with Spine 4, this time with the Timeline extension - noticed that when the Timeline finishes playing, it pauses the animation track.
Video of issue:
It's definitely due to the "Don't Pause with Director" option - is it intended to work this way where it counts as a "pause" when the Timeline finishes, or would it be possible to differentiate between the Timeline pausing versus the Timeline completing? (I know Timeline is pretty tricky to work with... lol)
Personally, if there isn't a way to distinguish between the two, I feel like maybe the "Dont Pause with Director" option should be checked by default? :think:
Was this working before or is this new?
I don't recall specific details but before to keep the animation playing after the timeline end I needed to set Wrap Mode to Hold and it keeps playing the last set spine animation. I just tried setting the Wrap Mode to None (as in your video) and my timeline behaved the same way as yours, which AFAIR was the same with the 3.8 timeline.
When I added the "don't pause with director" I added it more as a workaround to support the older behavior before this fix was create:
https://github.com/EsotericSoftware/spine-runtimes/issues/1920
which I needed in the middle of the timeline, I didn't expected it to "work" also at the end of the timeline
Edit: Or I needed the Hold mode because of the unity animation that was also supposed to keep looping in my case
Edit2: I wanted to justify the default to false, a bit more. The fix above was to pause with the director, which I believe made it consistent with how other unity components work, I just needed it not be like that in a few case (see here: Timeline and Director pause change )
To be honest I would also be happy to have a default of true, but wouldn't that be a more of an inconsistent behavior inside unity?
Edit3: (I knew I should have finished my morning coffees before posting crap on internet)
I just went back in time and tested before the 4.0 (on 3.8 ) upgrade and it definitely didn't stop the spine animation, only the unity animator when using wrap mode set to None, but played both when set to Hold.
Jamez0r yazdıPersonally, if there isn't a way to distinguish between the two, I feel like maybe the "Dont Pause with Director" option should be checked by default?
As stated by vhristov in the posting above, we prefer to keep it to the default Unity behaviour as much as possible (which is to pause Spine animations with the directory), even if this means breaking the default behaviour once.
Jamez0r yazdıIt's definitely due to the "Don't Pause with Director" option - is it intended to work this way where it counts as a "pause" when the Timeline finishes, or would it be possible to differentiate between the Timeline pausing versus the Timeline completing? (I know Timeline is pretty tricky to work with... lol)
Thanks for reporting! We will have a look if it can safely be distinguished.
vhristov yazdıEdit3: (I knew I should have finished my morning coffees before posting crap on internet)
:coffee: :nerd: No problem, thanks for updating the posting!
This feature has just been implemented.
- Timeline clips now also offer a
Don't Pause on Stop
parameter in addition toDon't Pause with Director
for partially keeping old pause behaviour. This allows to continue playback after the Graph has stopped (when the Track has ended) whenDon't Pause with Director
is disabled. WhenDon't Pause with Director
is enabled, this parameter has no effect.
A new 4.0 Timeline UPM package is available for download here as usual:
Spine Unity Download
It was tracked under this issue ticket:
https://github.com/EsotericSoftware/spine-runtimes/issues/1933
Harald yazdıJamez0r yazdıPersonally, if there isn't a way to distinguish between the two, I feel like maybe the "Dont Pause with Director" option should be checked by default?
As stated by vhristov in the posting above, we prefer to keep it to the default Unity behaviour as much as possible (which is to pause Spine animations with the directory), even if this means breaking the default behaviour once.
Jamez0r yazdıIt's definitely due to the "Don't Pause with Director" option - is it intended to work this way where it counts as a "pause" when the Timeline finishes, or would it be possible to differentiate between the Timeline pausing versus the Timeline completing? (I know Timeline is pretty tricky to work with... lol)
Thanks for reporting! We will have a look if it can safely be distinguished.
vhristov yazdıEdit3: (I knew I should have finished my morning coffees before posting crap on internet)
:coffee: :nerd: No problem, thanks for updating the posting!
This feature has just been implemented.
- Timeline clips now also offer a
Don't Pause on Stop
parameter in addition toDon't Pause with Director
for partially keeping old pause behaviour. This allows to continue playback after the Graph has stopped (when the Track has ended) whenDon't Pause with Director
is disabled. WhenDon't Pause with Director
is enabled, this parameter has no effect.A new 4.0 Timeline UPM package is available for download here as usual:
Spine Unity DownloadIt was tracked under this issue ticket:
https://github.com/EsotericSoftware/spine-runtimes/issues/1933
Thanks Harald and Vhristov!
I updated to the new Timeline package, and set DontPauseOnStop to True by default, and it looks to be working great.
I'm a bit confused by the reasoning for DontPauseOnStop to be False by default - it seems strange that a checkbox on a Clip (that could have ended well before the Timeline finished playing) would cause the animation on that track to then pause at the end. :think: But I totally understand if that's how the unity Animator type clips behave by default, and we're trying to match that.
Jamez0r yazdıthat could have ended well before the Timeline finished playing
This made me realize that the way how Pause is implemented is not actually breaking Jamez0r's spine timeline but is pausing an animation that is already controlled outside of the timeline. I personally don't have such a use case in my project neither with spine, nor with unity's animator, so I cannot comment on how it shall work, but I can agree that it looks strange.
It makes me wonder if the HandlePause shall pause the current TrackEntry or what is actually being played by the timeline, which in Jamez0r's case is already nothing. Something like saving the trackEntry when doing SetAnimation and then pause that ?
Another issue I found out that there is an inconsistency between how playing the timeline behaves while playing in edit-mode (or scrubbing) vs playing it in play mode (unrelated to 4.0, reproducible on 3.8 too, but worth mentioning here I believe).
On the first image the animation is played completely in both Edit/Scrub/Play mode.
On the Second image:
- In editor/scrub mode the animation is played only up to 580 frame (where the state clip ends) then it is frozen
- In play mode the animation is played for the full duration the same way as in the first image (from 450 all the way up to 840)
Thanks for getting back to us. These are indeed very valid points, thanks for reporting! We'll see what we can do.
The above issue have just been fixed with the latest 4.0 Timeline package (also fixing this issue ticket). Behaviour at clip end (includes graph stop) is now configurable and defaults to mix out to the empty animation at the clip's end.
- Fixed Timeline
Spine AnimationState Clips
ignoring empty space on the Timeline after a clip's end. Timeline clips now also offerDon't End with Clip
andClip End Mix Out Duration
parameters if you prefer the old behaviour of previous versions. By default when empty space follows the clip on the timeline, the empty animation is set on the track with a MixDuration ofClip End Mix Out Duration
. SetDon't End with Clip
to true to continue playing the clip's animation instead and mimic the old 3.8 behaviour. If you prefer pausing the animation instead of mixing out to the empty animation, setClip End Mix Out Duration
to a value less than 0, then the animation is paused instead.
The spine-unity 4.0 Timeline UPM package is available for download here as usual:
Spine Unity Download
Please let us know if this now resolves your issues!
Hey Harald! I'm back to doing some work in Timeline and have been testing this new version out.
Fixed Timeline Spine AnimationState Clips ignoring empty space on the Timeline after a clip's end.
This looks to have fixed the original problem I had in this post. Meaning I can keep "Don't Pause with Director" the default value (false). Awesome!
I think there might be a typo on the documentation here:
Use Blend Duration. When enabled, the value under Mix Duration will be synced with the timeline clip transition duration 'Ease In Duration'. Enable this value to adjust transition durations by moving the clip into the previous clip, resulting in a cross-fade triangle at the transition.
I think that should say "Blend In Duration" instead of Ease In Duration. I'm under the assumption that "Ease In Duration" isn't used for anything with a Spine Animation State Clip?
Actually, on the subject of Ease-In Duration... I was curious if it would be possible to use it?
Made a video:
Also sorry for my bombardment of questions/posts the past couple days haha
Jamez0r yazdıThis looks to have fixed the original problem I had in this post. Meaning I can keep "Don't Pause with Director" the default value (false). Awesome!
Very glad to hear! 8)
Jamez0r yazdıI think there might be a typo on the documentation here:
...
I think that should say "Blend In Duration" instead of Ease In Duration. I'm under the assumption that "Ease In Duration" isn't used for anything with a Spine Animation State Clip?
Thanks for pointing that out. I just noticed that blendInDuration
and easeInDuration
in Unity's clip API do not resolve to a single value behind the scene, which I would have expected.
We could quite easily adjust the Mix Duration
to the both blendInDuration
and easeInDuration
, but unfortunately as you have shown in the video, this would not lead to a transition from the empty animation with only this modification. Unfortunately the required modifications are not completely trivial, I might have a more in-depth look at it later this week.
We could quite easily adjust the Mix Duration to the both blendInDuration and easeInDuration
Awesome~~ that would be great!
but unfortunately as you have shown in the video, this would not lead to a transition from the empty animation with only this modification. Unfortunately the required modifications are not completely trivial, I might have a more in-depth look at it later this week.
Yeah, figured that one was a bit more tricky :bigeye: Do you think that in the meantime it would be safe to do what I did in the video, where I placed the Empty Animation clip to start on the same frame as the actual Animation clip (where it's fully overlapping the Empty Animation clip)? Wasn't sure if that was more of a 'hack' or if it would be okay to do. It seemed to work! :nerd:
Thanks Harald!!
Jamez0r yazdıHarald yazdıWe could quite easily adjust the Mix Duration to the both blendInDuration and easeInDuration
Awesome~~ that would be great!
Sorry, that was a bit misleading perhaps:
The code could easily be adjusted to set the mix duration to respect both blendInDuration
and easeInDuration
, but unless mixing from blank space works it will not have any effect. At least that's what quick tests have shown.
Jamez0r yazdıDo you think that in the meantime it would be safe to do what I did in the video, where I placed the Empty Animation clip to start on the same frame as the actual Animation clip (where it's fully overlapping the Empty Animation clip)? Wasn't sure if that was more of a 'hack' or if it would be okay to do. It seemed to work! :nerd:
It should not stop working after any of the planned changes, so it should be a safe workaround. I can say more about it when having had a more in-depth look.
The issues have just been fixed, a new 4.0 timeline package is available for download here as usual:
Spine Unity Download
EaseIn should now work with either of these three ways:
-
having blank space in front,
-
the empty animation starting at the same time,
-
or the empty animation starting earlier.
Please let me know if this fixes your issues as well. Thanks again for reporting!
Issue ticket URL for later reference:
https://github.com/EsotericSoftware/spine-runtimes/issues/1961
Hey Harald! The new functionality is working great!! WOOHOO! Thanks a ton :grinteeth:
I confirmed it is working as expected for an animation track that has no animation on it, as well as an animation track that was already playing an animation (before the Timeline was activated). All combinations of the settings looked to operate as desired :nerd:
I found two minor bugs - I think one is a simple null-check, and the other I think is just an internal value for MixDuration that isn't getting updated.
Made an issue ticket for them: https://github.com/EsotericSoftware/spine-runtimes/issues/1962
Is it preferred that I made this separate ticket, or should I have tacked this onto the previous ticket (#1961)?
Thanks again on behalf of my entire team, your speedy help is extremely appreciated!
Glad the majority worked as desired, sorry to hear that there is this update issue remaining. :wounded: I'm more happy with a separate ticket in this case, thanks for creating!
Unfortunately after some investigation it seems a bit like an Editor scripting quirk of Unity, since it only does not save the modifications to the timline asset when inside play mode, when play mode is not started, it seems to work. We will have another try on fixing this issue next week hopefully, since some things we quickly tested failed to make any change. In case you discover what could fix the problem, as always don't hesitate to let us know, we're more than happy to integrate your bugfixes! 8)
Harald yazdıUnfortunately after some investigation it seems a bit like an Editor scripting quirk of Unity, since it only does not save the modifications to the timline asset when inside play mode, when play mode is not started, it seems to work. We will have another try on fixing this issue next week hopefully, since some things we quickly tested failed to make any change. In case you discover what could fix the problem, as always don't hesitate to let us know, we're more than happy to integrate your bugfixes! 8)
Yeah, my experience with creating custom Timeline stuff hasn't been the most enjoyable haha - you'll go to implement something that you'd expect would take you two minutes and then it turns into hours of trying to figure out how to do it :confused:
I spent a couple hours looking at what is going on, and I did find what miiiight be a solution, but I am not sure if it is too hacky to implement in the official Spine-Timeline package. It might be fine, I'm just not an expert at Timeline so don't want to be responsible if there is an issue with it :rofl: :rofl: I updated the issue ticket with the info.
Also quick question - do you get notifications for the issue tickets when I add a reply to them? Just want to make sure you'd see the new info before spending any more time on it.
I received email notifications for your additional comment, so no chance of missing it, thanks for asking.
Thanks very much for your efforts, very much appreciated as always! 8) We will have an in-depth look at it and let you know whether the workaround can safely be integrated.
The proposed solution is indeed suitable, thanks very much for sharing! 8)
A new 4.0 Spine Timeline UPM package with the respective changes is available for download:
Spine Unity Download
Harald yazdıI received email notifications for your additional comment, so no chance of missing it, thanks for asking.
Thanks very much for your efforts, very much appreciated as always! 8) We will have an in-depth look at it and let you know whether the workaround can safely be integrated.
The proposed solution is indeed suitable, thanks very much for sharing! 8)
A new 4.0 Spine Timeline UPM package with the respective changes is available for download:
Spine Unity Download
Tested the new version on my end, looks to be working great! Thanks Harald!!!
Thanks as well Jamez0r! 8)