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.