Events

Each animation has 3 events. You can add or remove events from an animation at any time.

Main Method

The main method of adding events is generally faster.

On Start

animation.OnStart(() => { Debug.Log("test"); });

On Update

animation.OnUpdate(() => { Debug.Log("test"); });

On Complete

animation.OnComplete(() => { Debug.Log("test"); });

Alternative Method

Optionally, you can opt for a different method of adding events that may make removing them easier.

On Start

Add Event

Remove Event

On Update

Add Event

Remove Event

On Complete

Add Event

Remove Event

Remove All

You can call UnityEvent.RemoveAllListeners to remove all event listeners.

Last updated