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.
- Listed in Global namespace: A to B
- Inherits or implements
IAltaEvent<T>,IAltaEventValidation - Derived types
CookableEvent,JointPointEvent,DeathEvent,ImpactHitEvent,KeyItemEvent,LockableEvent,LockEvent,LockItemEvent,ModifiableStaticEvent,PopulationEvent,AttachmentEvent,WoodcutTreeEvent,WoodcutTreeModelEvent,ArrowEvent,BoolEvent,BreakOnImpact.TransformProxyEvent,BuildingAnimationEvent,BuildupPickupEvent,CharacterControllerEvent,ColliderAltaEvent,ColorEvent,EdibleEvent,EmbeddableEvent,FloatEvent,HandleValueEvent,HealthObjectEvent,IntEvent,PickupEvent,PlayerEvent,PositionEvent,ProjectileAltaEvent,PullEvent,ServerElementEvent,ToggleEvent,TransformEvent,TriggerEnterEvents.ColliderEvent
Constructors
| Member | What it is |
|---|---|
AltaEvent() | Creates an AltaEvent with default values. |
Fields
2 private and internal fields
| Member | What it is |
|---|---|
private static Logger logger | Shared AltaEvent logger, used when a handler throws. |
private UnityEventT triggered | The serialized inspector UnityEvent, invoked before the C# Invoked event. |
Properties
| Member | What 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
Events
| Member | What it is |
|---|---|
event Action<T> Invoked | The C# side of the event. |
Methods
| Member | What 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. |