Class CommandEventBase<T>
Base class for command events.
Inherited Members
Namespace: UnityEngine.UIElements
Syntax
public abstract class CommandEventBase<T> : EventBase<T>, ICommandEvent where T : CommandEventBase<T>, new()
Type Parameters
Name | Description |
---|---|
T |
Constructors
CommandEventBase()
Declaration
protected CommandEventBase()
Properties
commandName
Name of the command.
Declaration
public string commandName { get; protected set; }
Property Value
Type | Description |
---|---|
String |
Implements
Methods
GetPooled(Event)
Gets an event from the event pool and initializes it with the given values. 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.
Declaration
public static T GetPooled(Event systemEvent)
Parameters
Type | Name | Description |
---|---|---|
Event | systemEvent | An IMGUI command event. |
Returns
Type | Description |
---|---|
T | An initialized event. |
GetPooled(String)
Gets an event from the event pool and initializes it with the given values. 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.
Declaration
public static T GetPooled(string commandName)
Parameters
Type | Name | Description |
---|---|---|
String | commandName | The command name. |
Returns
Type | Description |
---|---|
T | An initialized event. |
Init()
Resets the event members to their initial values.
Declaration
protected override void Init()
Overrides
UnityEngine.UIElements.EventBase<T>.Init()