- Edited
Spine timeline looping inconsistencies
If you create a timeline with a "Spine Animation State Track" containing one clip and set the "Wrap mode" of the timeline to Looping, then the timeline loops but the animation is only played once (not what I expected).
However, if you then add a second animation clip to the same track, then both clips are looped (as I expected).
Am I missing something here?
I must say that your usage of Timeline is a bit strange. Nevertheless, you have discovered a bug there.
Unfortunately Unity's Timeline API seems broken in that regard that FrameData.timeLooped
never returns true
.
public override void ProcessFrame (Playable playable, FrameData info, object playerData) {
if (info.timeLooped) // never returns true, also not in other callback methods.
Documentation of the FrameData.timeLooped
property states
"Indicates the local time wrapped because it has reached the duration and the extrapolation mode is set to Loop."
so this should be returning true
in the frame where a wrap happened.
Unfortunately the other query methods don't return anything either that indicates a wrap-around at a single animation.
If anyone knows a reliable solution, please let us know, we are happy to implement it.
For now the workaround is to add a single animation twice.
I keep bumping into this one, so weird to have to stack two identical spine clips to get them to loop reliably.
Any changes in the Unity APIs that could fix this?
Thanks
kloot wroteAny changes in the Unity APIs that could fix this?
Do you mean whether there have been any additions to the Unity API in recent Unity version updates?
Im wondering if you now have a way to fix this bug.
Unfortunately the situation has remained unchanged so far, sorry.