Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


EventArg<TArg>

A reusable identifier for an event callback argument of type TArg.
Read time 1 minuteLast updated 4 days ago

Definition

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

RegisterSets 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.
UnregisterRemoves 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.

Inheritance

Inherited Members