Skip to main content

AltaEvent<T1, T2, UnityEventT1T2>

A class in Root.Township, the global namespace.

Two-argument event that runs both inspector-set UnityEvent listeners and C# listeners, logging errors from either instead of throwing.

Constructors​

MemberWhat it is
AltaEvent()Creates an AltaEvent with default values.

Fields​

2 private and internal fields
MemberWhat it is
private static Logger loggerShared AltaEvent logger, used when a handler throws.
private UnityEventT1T2 triggeredThe serialized inspector UnityEvent, invoked before the C# Invoked event.

Properties​

1 private and internal property
MemberWhat it is
private UnityEventBase IAltaEventValidation.EventBase { get; }Exposes the inspector UnityEvent so Validate can clean it.

Events​

MemberWhat it is
event Action<T1, T2> InvokedC# listeners.

Methods​

MemberWhat it is
void Invoke(T1 argument1, T2 argument2)Runs the inspector listeners, then Invoked. Exceptions are logged.
static AltaEvent<T1, T2, UnityEventT1T2> op_Addition(AltaEvent<T1, T2, UnityEventT1T2> altaEvent, Action<T1, T2> eventHandler)Adds a C# listener.
static AltaEvent<T1, T2, UnityEventT1T2> op_Subtraction(AltaEvent<T1, T2, UnityEventT1T2> altaEvent, Action<T1, T2> eventHandler)Removes a C# listener.