# EventBase

> The base class for all UIElements events. The class implements IDisposable to ensure proper release of the event from the pool and of any unmanaged resources, when necessary.

## Definition

* **Type:** Class
* **Namespace:** [UnityEngine.UIElements](/engine/6000.3/script-reference/unityengine/uielements.md)
* **Assembly:** UnityEngine.UIElementsModule
* **Implements:** [IDisposable](https://learn.microsoft.com/dotnet/api/system.idisposable)

```csharp
public abstract class EventBase : IDisposable
```

## Constructors

| Constructor                                                                             | Description                                                                                                                           |
| --------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| [EventBase()](/engine/6000.3/script-reference/unityengine/uielements/eventbase/ctor.md) | Constructor. Avoid creating new event instances. Instead, use GetPooled() to get an instance from a pool of reusable event instances. |

## Properties

| Property                                                                                                                           | Description                                                                                                                                                                                                                                                                                           |
| ---------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [bubbles](/engine/6000.3/script-reference/unityengine/uielements/eventbase/bubbles.md)                                             | Returns whether this event type bubbles up in the event propagation path during the BubbleUp phase.                                                                                                                                                                                                   |
| [currentTarget](/engine/6000.3/script-reference/unityengine/uielements/eventbase/currenttarget.md)                                 | The current target of the event. This is the VisualElement, in the propagation path, for which event handlers are currently being executed.                                                                                                                                                           |
| [dispatch](/engine/6000.3/script-reference/unityengine/uielements/eventbase/dispatch.md)                                           | Indicates whether the event is being dispatched to a visual element. An event cannot be redispatched while it being dispatched. If you need to recursively dispatch an event, it is recommended that you use a copy of the event.                                                                     |
| [eventTypeId](/engine/6000.3/script-reference/unityengine/uielements/eventbase/eventtypeid.md)                                     | Retrieves the type ID for this event instance.                                                                                                                                                                                                                                                        |
| [ignoreDisabledElements](/engine/6000.3/script-reference/unityengine/uielements/eventbase/ignoredisabledelements.md)               | If this property is true, callbacks for this event are not invoked when the current target is disabled, unless those callbacks are registered using the [CallbackOptions.IncludeDisabled](/engine/6000.3/script-reference/unityengine/uielements/callbackoptions/includedisabled.md) option.          |
| [imguiEvent](/engine/6000.3/script-reference/unityengine/uielements/eventbase/imguievent.md)                                       | The IMGUIEvent at the source of this event. The source can be null since not all events are generated by IMGUI.                                                                                                                                                                                       |
| [isImmediatePropagationStopped](/engine/6000.3/script-reference/unityengine/uielements/eventbase/isimmediatepropagationstopped.md) | Indicates whether [EventBase.StopImmediatePropagation()](/engine/6000.3/script-reference/unityengine/uielements/eventbase/stopimmediatepropagation.md) was called for this event.                                                                                                                     |
| [isPropagationStopped](/engine/6000.3/script-reference/unityengine/uielements/eventbase/ispropagationstopped.md)                   | Returns true if [EventBase.StopPropagation()](/engine/6000.3/script-reference/unityengine/uielements/eventbase/stoppropagation.md) or [EventBase.StopImmediatePropagation()](/engine/6000.3/script-reference/unityengine/uielements/eventbase/stopimmediatepropagation.md) was called for this event. |
| [originalMousePosition](/engine/6000.3/script-reference/unityengine/uielements/eventbase/originalmouseposition.md)                 | The original mouse position of the IMGUI event, before it is transformed to the current target local coordinates.                                                                                                                                                                                     |
| [pooled](/engine/6000.3/script-reference/unityengine/uielements/eventbase/pooled.md)                                               | Whether the event is allocated from a pool of events.                                                                                                                                                                                                                                                 |
| [propagationPhase](/engine/6000.3/script-reference/unityengine/uielements/eventbase/propagationphase.md)                           | The current propagation phase for this event.                                                                                                                                                                                                                                                         |
| [target](/engine/6000.3/script-reference/unityengine/uielements/eventbase/target.md)                                               | The target visual element that received this event. Unlike currentTarget, this target does not change when the event is sent to other elements along the propagation path.                                                                                                                            |
| [timestamp](/engine/6000.3/script-reference/unityengine/uielements/eventbase/timestamp.md)                                         | The time when the event was dispatched, in milliseconds.                                                                                                                                                                                                                                              |
| [tricklesDown](/engine/6000.3/script-reference/unityengine/uielements/eventbase/tricklesdown.md)                                   | Returns whether this event is sent down the event propagation path during the TrickleDown phase.                                                                                                                                                                                                      |

## Methods

| Method                                                                                                                   | Description                                                                                                                           |
| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------- |
| [Dispose](/engine/6000.3/script-reference/unityengine/uielements/eventbase/dispose.md)                                   | Implementation of IDisposable.                                                                                                        |
| [Init](/engine/6000.3/script-reference/unityengine/uielements/eventbase/init.md)                                         | Resets all event members to their initial values.                                                                                     |
| [PostDispatch](/engine/6000.3/script-reference/unityengine/uielements/eventbase/postdispatch.md)                         | Allows subclasses to perform custom logic after the event has been dispatched.                                                        |
| [PreDispatch](/engine/6000.3/script-reference/unityengine/uielements/eventbase/predispatch.md)                           | Allows subclasses to perform custom logic before the event is dispatched.                                                             |
| [StopImmediatePropagation](/engine/6000.3/script-reference/unityengine/uielements/eventbase/stopimmediatepropagation.md) | Stops the propagation of the event to other targets, and prevents other subscribers to the event on this target to receive the event. |
| [StopPropagation](/engine/6000.3/script-reference/unityengine/uielements/eventbase/stoppropagation.md)                   | Stops the propagation of the event to other targets. All subscribers to the event on this target still receive the event.             |

## Static Methods

| Method                                                                                                     | Description                                        |
| ---------------------------------------------------------------------------------------------------------- | -------------------------------------------------- |
| [RegisterEventType](/engine/6000.3/script-reference/unityengine/uielements/eventbase/registereventtype.md) | Registers an event class to the event type system. |
