Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


EventBase<T>

Generic base class for events, implementing event pooling and automatic registration to the event type system.
Read time 2 minutesLast updated 5 days ago

Definition

public abstract class EventBase<T> : EventBase, IDisposable where T : EventBase<T>, new()

Properties

Property

Description

eventTypeIdSee _eventTypeId.

Methods

Method

Description

DisposeImplementation of IDispose.
InitResets all event members to their initial values.

Static Methods

Method

Description

GetPooledGets 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
Dispose()
to release them.
SetCreateFunctionAllows to provide a function to create the event instance without relying on Activator.CreateInstance.
TypeIdRetrieves the type ID for this event instance.

Inheritance