ScriptReference/UIElements.CallbackEventHandler.RegisterCallback #548
Replies: 2 comments
-
|
You can see a curated list of events here. Events in
|
| Type | Description |
|---|---|
AttachToPanelEvent |
When an element is added to an element that is a descendent of a panel. |
BlurEvent |
Sent immediately after an element has lost focus. This event trickles down, it does not bubble up, and it cannot be cancelled. |
ChangeEvent<T0> |
When a value in a field changes. |
ClickEvent |
When the left mouse button is clicked. |
ContextClickEvent |
When clicking the right mouse button. |
ContextualMenuPopulateEvent |
When a contextual menu requires menu items. |
CustomStyleResolvedEvent |
When the custom style properties of a VisualElement have been resolved. |
DetachFromPanelEvent |
Sent just before an element is detached from its parent if the parent is the descendant of a panel. |
DragEnterEvent |
Used to manage events that occur when dragging enters an element or one of its descendants. The DragEnterEvent does not trickle down and does not bubble up. |
DragExitedEvent |
Sent to a dragged element when the drag and drop process ends. |
DragLeaveEvent |
Used to manage events sent when dragging leaves an element or one of its descendants. The DragLeaveEvent does not trickle down and does not bubble up. |
DragPerformEvent |
When another element is dragged and dropped on the element. |
DragUpdatedEvent |
When the element being dragged enters a possible drop target. |
ExecuteCommandEvent |
Sent by the Editor when an element in the panel should execute a command. (See also command events) |
FocusEvent |
Immediately after an element has gained focus. This event trickles down and does not bubbles up. |
FocusInEvent |
Immediately before an element gains focus. This event trickles down and bubbles up. |
FocusOutEvent |
Immediately before an element loses focus. This event trickles down and bubbles up. |
GeometryChangedEvent |
Sent after layout calculations, when the position or the dimension of an element changes. |
IMGUIEvent |
Used to send a IMGUI event that has no equivalent UIElements event. |
InputEvent |
When text from a TextField changes. |
KeyDownEvent |
When a key is pressed. |
KeyUpEvent |
When a pressed key is released. |
MouseCaptureEvent |
After a handler starts capturing the mouse. |
MouseCaptureOutEvent |
Before a handler stops capturing the mouse. |
MouseDownEvent |
When a mouse button is pressed. |
MouseEnterEvent |
When the mouse pointer enters an element or one of its descendent elements. The event trickles down but does not bubble up. |
MouseEnterWindowEvent |
When the mouse pointer enters a window. The event bubbles up but does not trickle down. |
MouseLeaveEvent |
When the mouse pointer exits an element and all its descendent elements. The event trickles down but does not bubble up. |
MouseLeaveWindowEvent |
When the mouse pointer exits a window. The event bubbles up but does not trickle down. |
MouseMoveEvent |
When the mouse moves. |
MouseOutEvent |
When the mouse pointer exits an element. The event trickles down and bubbles up. |
MouseOverEvent |
When the mouse pointer enters an element. The event trickles down and bubbles up. |
MouseUpEvent |
When a mouse button is released. |
NavigationCancelEvent |
When the user presses the cancel button. |
NavigationMoveEvent |
Typically when the user presses the D-pad, moves a joystick or presses the arrow keys. |
NavigationSubmitEvent |
When the user presses the submit button. |
PointerCancelEvent |
When pointer interaction is cancelled. |
PointerCaptureEvent |
When a pointer is captured by a VisualElement. |
PointerCaptureOutEvent |
When a VisualElement releases a pointer. |
PointerDownEvent |
When a pointer is pressed. |
PointerEnterEvent |
When a pointer enters a VisualElement or one of its descendants. The event does not trickle down and does not bubble up. |
PointerLeaveEvent |
Sent when a pointer exits an element and all of its descendants. The event does not trickle down and does not bubble up. |
PointerMoveEvent |
When a pointer changes state. For example if its position or pressure change, or a different button is pressed. |
PointerOutEvent |
When a pointer exits an element. The event trickles down and bubbles up. |
PointerOverEvent |
When a pointer enters an element. The event trickles down and bubbles up. |
PointerStationaryEvent |
When a pointer does not change for a set amount of time, determined by the operating system. |
PointerUpEvent |
When a pointer's last pressed button is released. |
TooltipEvent |
Sent to find the first VisualElement that displays a tooltip. |
TransitionCancelEvent |
When a transition is canceled. |
TransitionEndEvent |
The completion of a transition. In the case where a transition is removed before completion then the event will not fire. |
TransitionRunEvent |
When a transition is created (i.e. added to the set of running transitions). |
TransitionStartEvent |
When a transition's delay phase ends. |
ValidateCommandEvent |
Sent by the Editor while it determines whether the command will be handled by an element in the panel. |
WheelEvent |
When the mouse wheel moves. |
UnityEditor.UIElements
| Type | Description |
|---|---|
SerializedObjectChangeEvent |
When any value in a SerializedObject changes. |
SerializedPropertyChangeEvent |
When a value in a PropertyField changes. |
SerializedObjectBindEvent (internal) |
When a SerializedObject is bound to the element. |
SerializedPropertyBindEvent (internal) |
When a SerializedProperty is bound to the element. |
Beta Was this translation helpful? Give feedback.
-
|
There exists a rather large trap when using the callback that takes
"The same callback function" is comparing delegates, and multiple calls to an event like |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
ScriptReference/UIElements.CallbackEventHandler.RegisterCallback
https://docs.unity3d.com/ScriptReference/UIElements.CallbackEventHandler.RegisterCallback.html
Beta Was this translation helpful? Give feedback.
All reactions