EventArg<TArg>
A reusable identifier for an event callback argument of type TArg.
Read time 1 minuteLast updated 4 days ago
Definition
- Type: Class
- Namespace: UnityEngine.UIElements
- Assembly: UnityEngine.UIElementsModule
- Inherits from: EventArg
public abstract class EventArg<TArg> : EventArg
Remarks
Use the EventArg.Create factory method to create instances of this class and EventArg<TArg>.Register, EventArg<TArg>.Unregister to assign argument values to individual elements for all callbacks that use this argument identifier in their definition.
Additional Resources: EventArg, EventCallback.Create
Methods
Method | Description |
|---|---|
| Register | Sets a value for the provided element for this argument identifier. That value can then be retrieved by callbacks that have a second argument of the same type. |
| Unregister | Removes the value for the provided element for this argument identifier. Until a new value is set, a value can no longer be retrieved by callbacks that have a second argument of the same type. |