Version: 2017.3 (switch to 2017.4)
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

Experimental: this API is experimental and might be changed or removed in the future.

EventBase

class in UnityEngine.Experimental.UIElements

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

The base class for all UIElements events.

Properties

bubblesReturns whether this event type bubbles up in the event propagation path.
capturableReturn whether this event is sent down the event propagation path during the capture phase.
currentTargetThe current target of the event. The current target is the element in the propagation path for which event handlers are currently being executed.
dispatchReturn whether the event is currently being dispatched to visual element. An event can not be redispatched while being dispatched. If you need to recursively redispatch an event, you should use a copy.
imguiEventThe IMGUIEvent at the source of this event. This can be null as not all events are generated by IMGUI.
isDefaultPreventedReturn true if the default actions should not be executed for this event.
isImmediatePropagationStoppedReturn true if StopImmediatePropagation() has been called for this event.
isPropagationStoppedReturn true if StopPropagation() has been called for this event.
propagationPhaseThe current propagation phase.
targetThe target for this event. The is the visual element that received the event. Unlike currentTarget, target does not change when the event is sent to elements along the propagation path.
timestampThe time at which the event was created.

Public Methods

GetEventTypeIdGet the type id for this event instance.
PreventDefaultCall this function to prevent the execution of the default actions for this event.
StopImmediatePropagationImmediately stop the propagation of this event. The event will not be sent to any further event handlers on the current target or on any other element in the propagation path.
StopPropagationStop the propagation of this event. The event will not be sent to any further element in the propagation path. Further event handlers on the current target will be executed.

Protected Methods

InitReset the event members to their initial value.

Static Methods

RegisterEventTypeRegister an event class to the event type system.

Did you find this page useful? Please give it a rating: