UI Toolkit ExecuteDefaultAction is obsolete: use HandleEventBubbleUp

Unity 6 renamed UI Toolkit's default actions: ExecuteDefaultAction is now HandleEventBubbleUp and ExecuteDefaultActionAtTarget is HandleEventTrickleDown.

Status
Obsolete since Unity 6.0 · UI Toolkit
Old
ExecuteDefaultAction, ExecuteDefaultActionAtTarget, PreventDefault
New
HandleEventBubbleUp, HandleEventTrickleDown, StopPropagation
Checked
2026-10-05, against the sources below

What changed

Custom UI Toolkit controls that override ExecuteDefaultAction or ExecuteDefaultActionAtTarget get obsolete warnings in Unity 6. The upgrade guide maps them to HandleEventBubbleUp and HandleEventTrickleDown, and deprecates the AtTarget dispatching phase.

PreventDefault is deprecated as well; the guide says to use StopPropagation instead. Check each handler after renaming: a default action ran after the event's other callbacks, so make sure the new method sees the event in the phase you expect.

Before and after

Before
C#
protected override void ExecuteDefaultAction(EventBase evt)
{
    if (evt is ClickEvent) Toggle();
}
After
C#
protected override void HandleEventBubbleUp(EventBase evt)
{
    if (evt is ClickEvent) Toggle();
}

Find every place it appears

This change needs a hand edit, but the Unity 6 Script Upgrade Checker points to every line it affects, together with the other changes for your target version.

Open this example in the checker

Questions

What is the difference between trickle-down and bubble-up?
An event first travels from the root of the panel down to the target (trickle-down), then back up from the target to the root (bubble-up). Most controls handle events on the way up; use trickle-down when a parent must see the event before its children.
Do callbacks registered with RegisterCallback change?
No. Only controls that override the default-action methods are affected. Callbacks you add with RegisterCallback keep working as before.

Sources

Related Unity 6 changes

Every Unity 6.x change, by version