# 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.0/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.0/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.0/script-reference/unityengine/uielements/eventbase/bubbles.md)                                             | Returns whether this event type bubbles up in the event propagation path.                                                                                                                                                         |
| [currentTarget](/engine/6000.0/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.0/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.0/script-reference/unityengine/uielements/eventbase/eventtypeid.md)                                     | Retrieves the type ID for this event instance.                                                                                                                                                                                    |
| [imguiEvent](/engine/6000.0/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.0/script-reference/unityengine/uielements/eventbase/isimmediatepropagationstopped.md) | Indicates whether StopImmediatePropagation() was called for this event.                                                                                                                                                           |
| [isPropagationStopped](/engine/6000.0/script-reference/unityengine/uielements/eventbase/ispropagationstopped.md)                   | Whether StopPropagation() was called for this event.                                                                                                                                                                              |
| [originalMousePosition](/engine/6000.0/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.0/script-reference/unityengine/uielements/eventbase/pooled.md)                                               | Whether the event is allocated from a pool of events.                                                                                                                                                                             |
| [propagationPhase](/engine/6000.0/script-reference/unityengine/uielements/eventbase/propagationphase.md)                           | The current propagation phase for this event.                                                                                                                                                                                     |
| [target](/engine/6000.0/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.0/script-reference/unityengine/uielements/eventbase/timestamp.md)                                         | The time when the event was created, in milliseconds.                                                                                                                                                                             |
| [tricklesDown](/engine/6000.0/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.0/script-reference/unityengine/uielements/eventbase/dispose.md)                                   | Implementation of IDisposable.                                                                                                                                                                                                                                                                                                                                                      |
| [Init](/engine/6000.0/script-reference/unityengine/uielements/eventbase/init.md)                                         | Resets all event members to their initial values.                                                                                                                                                                                                                                                                                                                                   |
| [PostDispatch](/engine/6000.0/script-reference/unityengine/uielements/eventbase/postdispatch.md)                         | Allows subclasses to perform custom logic after the event has been dispatched.                                                                                                                                                                                                                                                                                                      |
| [PreDispatch](/engine/6000.0/script-reference/unityengine/uielements/eventbase/predispatch.md)                           | Allows subclasses to perform custom logic before the event is dispatched.                                                                                                                                                                                                                                                                                                           |
| [StopImmediatePropagation](/engine/6000.0/script-reference/unityengine/uielements/eventbase/stopimmediatepropagation.md) | Immediately stops the propagation of the event. The event isn't sent to other elements along the propagation path. This method prevents other event handlers from executing on the current target.                                                                                                                                                                                  |
| [StopPropagation](/engine/6000.0/script-reference/unityengine/uielements/eventbase/stoppropagation.md)                   | Stops propagating this event. The event is not sent to other elements along the propagation path. This method does not prevent other event handlers from executing on the current target. If this method is called during the TrickleDown propagation phase, it will prevent default actions to be processed, such as an element getting focused as a result of a PointerDownEvent. |

## Static Methods

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