diff --git a/spine-unity/Assets/examples/spineboy/Spineboy.cs b/spine-unity/Assets/examples/spineboy/Spineboy.cs index 86921e512..60d478ce9 100644 --- a/spine-unity/Assets/examples/spineboy/Spineboy.cs +++ b/spine-unity/Assets/examples/spineboy/Spineboy.cs @@ -41,6 +41,10 @@ public class Spineboy : MonoBehaviour { skeletonAnimation = GetComponent(); // Call our method any time an animation fires an event. skeletonAnimation.state.Event += Event; + // A lambda can be used for the callback instead of a method. + skeletonAnimation.state.End += (state, trackIndex) => { + Debug.Log("start: " + state.GetCurrent(trackIndex)); + }; // Queue jump to be played on track 0 two seconds after the starting animation. skeletonAnimation.state.AddAnimation(0, "jump", false, 2); // Queue walk to be looped on track 0 after the jump animation.