Yes, that is basically what I am doing. If you could, please review this small test project. It uses the latest Spine editor and Unity packages:
https://www.dropbox.com/s/2m3629klvjzqeg9/eventsnotfiring.zip?dl=0
I have included the Spine goblin3 project, which has two events that fire in its attack animation: ev_hit then ev_hitGoBack. I use this code to play attack, then idle:
// start
TrackEntry entry;
anim = GetComponent<SkeletonAnimation>();
anim.state.Event += HandleSkeletonEvent;
entry = anim.state.SetAnimation(0, "attack", false);
entry.EventThreshold = 1.0f;
entry = anim.state.AddAnimation(0, "idle", true, -0.5f);
entry.EventThreshold = 1.0f;
protected void HandleSkeletonEvent(TrackEntry entry, Spine.Event ev)
{
print(ev.Data.name);
}
It will only print ev_hit. If I set the delay to 0.0 for AddAnimation, then both events get fired. Perhaps I need to change the trackIndex or go about this differently? Ideally, I want to interpolate to other animations using a negative delay, but I still want all events to fire in both animations.