Skip to main content

AltaEvent<T, UnityEventT>

A class in Root.Township, the global namespace.

A serializable event with one argument that fires both an inspector UnityEvent and a C# event. Exceptions in either are caught and logged, so one bad handler does not stop the other side.

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 UnityEventT triggeredThe serialized inspector UnityEvent, invoked before the C# Invoked event.

Properties​

MemberWhat it is
bool HasListeners { get; }True if the inspector UnityEvent has persistent listeners. C# handlers added with += do not count.
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<T> InvokedThe C# side of the event.

Methods​

MemberWhat it is
void Invoke(T argument)Fires the inspector event, then the C# Invoked event, logging any exception from each.
static AltaEvent<T, UnityEventT> op_Addition(AltaEvent<T, UnityEventT> altaEvent, Action<T> eventHandler)+ adds a C# handler to Invoked.
static AltaEvent<T, UnityEventT> op_Subtraction(AltaEvent<T, UnityEventT> altaEvent, Action<T> eventHandler)- removes a C# handler from Invoked.