I noticed something today when trying to debug some of my animation code.
If I set a delay of -1 when calling AddAnimation, the queued animations all fire their start events simultaneously, and either all play simultaneously or only one plays (i couldn't tell which from my test setup). If i set the delays to 0 the animations queue correctly and play one after the other.
anim = GetComponent<SkeletonAnimation>();
anim.AnimationState.SetAnimation(1, first, true);
anim.AnimationState.AddAnimation(1, second, false, 5); // delay of 5 before interrupting first animation
anim.AnimationState.AddAnimation(1, third, false, -1);
anim.AnimationState.AddAnimation(1, fourth, false, -1);
anim.AnimationState.AddAnimation(1, fifth, false, -1);
anim.AnimationState.AddAnimation(1, first, true, -1);
This seems contrary to the behaviour described in the docs (quoted below). Is this a bug or did i misunderstand the description in the docs?
delay If > 0, sets delay. If <= 0, the delay set is the duration of the previous track entry minus any mix duration (from the AnimationStateData) plus the specified delay (ie the mix ends at (delay = 0) or before (delay < 0) the previous track entry duration). If the previous entry is looping, its next loop completion is used instead of its duration.