EventBase<T>
Generic base class for events, implementing event pooling and automatic registration to the event type system.
Read time 2 minutesLast updated 4 days ago
Definition
- Type: Class
- Namespace: UnityEngine.UIElements
- Assembly: UnityEngine.UIElementsModule
- Inherits from: EventBase
- Implements: IDisposable
public abstract class EventBase<T> : EventBase, IDisposable where T : EventBase<T>, new()
Properties
Property | Description |
|---|---|
| eventTypeId | See _eventTypeId. |
Methods
Method | Description |
|---|---|
| Dispose | Implementation of IDispose. |
| Init | Resets all event members to their initial values. |
Static Methods
Method | Description |
|---|---|
| GetPooled | Gets an event from the event pool. Use this function instead of creating new events. Events obtained using this method need to be released back to the pool. You can use |
| SetCreateFunction | Allows to provide a function to create the event instance without relying on Activator.CreateInstance. |
| TypeId | Retrieves the type ID for this event instance. |