Hello. I'm quite new on using Spine, and was wondering what's the proper way to set up events firing on animations. I'm using Unity, C#, and 2DToolkit. For some reason my scripts are not able to capture any events I put on the animations. I'm using what was given in the example:
void Start () {
skeleton = GetComponent<SkeletonAnimation>();
skeleton.state.Event += Event;
}
public void Event (object sender, EventTriggeredArgs e) {
Debug.Log(e.TrackIndex + " " + skeleton.state.GetCurrent(e.TrackIndex) + ": event " + e.Event + ", " + e.Event.Int);
}
I created a new event on my animation, and put it on one of the key frames of it. For some reason the event is never captured or fired. What could I be doing wrong?