For example:
// OnAnimationComplete invoked:
skeletonAnimation.state.Complete += OnAnimationComplete;
skeletonAnimation.state.SetAnimation(0, animation1, false);
skeletonAnimation.state.Complete += OnAnimationComplete;
skeletonAnimation.state.SetAnimation(0, animation1, false);
// OnAnimationComplete not invoked after completion of animation1:
skeletonAnimation.state.Complete += OnAnimationComplete;
skeletonAnimation.state.SetAnimation(0, animation1, false);
skeletonAnimation.state.AddAnimation(0, animation2, true, 0f);
I have confirmed this with a number of logs, all other events appear to fire. Of note, during the skeletonAnimation.state.Complete += OnAnimationComplete;
skeletonAnimation.state.SetAnimation(0, animation1, false);
skeletonAnimation.state.AddAnimation(0, animation2, true, 0f);
End
event the TrackEntry is not marked as complete and TrackTime
is less than TrackEntry.Animation.Duration
.private void OnAnimationEnd(TrackEntry trackEntry)
{
bool isComplete = trackEntry.IsComplete;// Returns false
bool reachedDuration = (trackEntry.TrackTime >= trackEntry.Animation.Duration);// Evaluates to false
}
This leaves me with no reliable way to determine if an animation has completed or not, which is obviously problematic.{
bool isComplete = trackEntry.IsComplete;// Returns false
bool reachedDuration = (trackEntry.TrackTime >= trackEntry.Animation.Duration);// Evaluates to false
}