Pharan wroteInstead of adding an event at the end time of each animation, is there a problem with using the Complete
event?
Well the only problem is that i'm not too experienced as a programmer so i'm having a tough time understanding how to use TrackEntry 🙁.
From the event example i understood i have to use the subscribe method
public SkeletonAnimation spine;
[SpineEvent] public string footstep = "Footstep";
bool footstepParticle = false;
void Start () {
// Spine subscribe to Event
spine.AnimationState.Event += HandleEvent;
spine.AnimationState.Start += delegate (TrackEntry trackEntry) {
};
spine.AnimationState.End += delegate {
};
}
void HandleEvent(TrackEntry trackEntry, Spine.Event e)
{
if (e.Data.Name == footstep)
{
footstepParticle = true;
}
}
This i mostly understand how to use for different events, but i haven't found any examples on how to end an animation using TrackEntry isComplete.