(1) https://github.com/EsotericSoftware/spi ... te.cs#L240
AnimationState.GetCurrent(trackIndex)
will return null if that track has no animations. But you'll have to keep checking every update. Not recommended.
(2) Use Complete
if you want to subscribe to whenever an animation finishes. You can find the difference between Complete
and End
here: viewtopic.php?f=8&t=4050
Don't ever bind a handler that calls SetAnimation to AnimationState's .End event. See the warning in the topic for more details.
(3) You can subscribe to events of specific animations (actually, specific TrackEntry's). I recommend doing this instead if you can.
// After you say :
var lastTrack = skeletonAnimation.state.AddAnimation(0, "myLastAnimation", false, 0f);
// you can also subscribe to it like this:
lastTrack.Complete += HandleLastComplete;