Various events are invoked throughout the tween lifecycle. A TweenCallback function delegate can be used to respond to the following events:

  • onUpdate: Invoked every time the tween is updated
  • onStart: Invoked when the tween is started
  • onStop: Invoked when the tween is stopped
  • onLoop: Invoked when the tween is looped
  • onComplete: Invoked when the tween is completed
  • onKill: Invoked when the tween is killed

🗣️ Assigning callbacks

Tween callbacks can be assigned with delegates or lambdas. They have no parameters or return types. You can also use property chaining to make it easier to set multiple callbacks.

// assigning callbacks with functions
tween.onUpdate += OnTweenUpdated
tween.onStart += OnTweenStarted;
tween.onStop += OnTweenStopped;
tween.onLoop += OnTweenLooped;
tween.onComplete += OnTweenCompleted;
tween.onKill += OnTweenKilled;
// assigning callbacks with lambdas
tween.onUpdate += () => Debug.Log("Updated");
tween.onStart += () => Debug.Log("Started");
tween.onStop += () => Debug.Log("Stopped");
tween.onLoop += () => Debug.Log("Looped");
tween.onComplete += () => Debug.Log("Completed");
tween.onKill += () => Debug.Log("Killed");
// assigning callbacks with property chaining
transform.TweenPosition(, 1f)

🎫 Event Handler

One drawback of using delegates is that it produces GC allocations. If you are highly concerned about performance, you can use the ITweenEventHandler interface to avoid allocations.

public class Example : MonoBehaviour, ITweenEventHandler
    private void Start()
        transform.TweenPosition(, 1f)

    public void OnTweenUpdate(Tween tween)

    public void OnTweenStart(Tween tween)

    public void OnTweenStop(Tween tween)

    public void OnTweenLoop(Tween tween)

    public void OnTweenComplete(Tween tween)

    public void OnTweenKill(Tween tween)