UltEvent Class

Summary

A serializable event with no parameters which can be viewed and configured in the inspector.

This is a more versatile and user friendly implementation than UnityEngine.Events.UnityEvent.
Assembly
UltEvents.dll
Namespace
UltEvents
Interfaces
Base Types
graph BT Type-->Base0["UltEventBase"] click Base0 "/ultevents/api/UltEvents/UltEventBase" Base0-->Base1["Object"] Type-.->Interface0["IUltEvent"] click Interface0 "/ultevents/api/UltEvents/IUltEvent" Type-.->Interface1["IUltEventBase"] click Interface1 "/ultevents/api/UltEvents/IUltEventBase" Type["UltEvent"] class Type type-node

Syntax

[Serializable]
public sealed class UltEvent : UltEventBase, IUltEvent, IUltEventBase

Attributes

Type Description
SerializableAttribute

Events

Name Type Summary
DynamicCalls Action
Delegates registered here are invoked by UltEvents.UltEvent.Invoke after all UltEvents.UltEvent.PersistentCalls.
PersistentCalls Action
Delegates registered to this event are serialized as UltEvents.PersistentCalls and are invoked by UltEvents.UltEvent.Invoke before all UltEvents.UltEvent.DynamicCalls.

Properties

Name Value Summary
DynamicCallsBase Delegate
The non-serialized method and parameter details of this event. Delegates registered here are called by UltEvents.UltEvent.Invoke after all UltEvents.UltEvent.PersistentCalls.
HasCalls bool
Returns true if this event has any UltEvents.UltEventBase.PersistentCallsList or UltEvents.UltEventBase.DynamicCallsBase registered.
Inherited from UltEventBase
ParameterTypes Type[]
[Editor-Only] The types of each of this event's parameters.
PersistentCallsList List<PersistentCall>
The serialized method and parameter details of this event.
Inherited from UltEventBase

Methods

Name Value Summary
AddDynamicCall(UltEvent, Action) void
Ensures that 'e' isn't null and adds 'method' to its UltEvents.UltEvent.DynamicCalls.
static
AddPersistentCall(Delegate) PersistentCall
Add the specified 'method to the persistent call list.
Inherited from UltEventBase
AddPersistentCall<T>(T, Action) PersistentCall
Ensures that 'e' isn't null and adds 'method' to its UltEvents.UltEventBase.PersistentCallsList.
Inherited from UltEventBase
static
AddPersistentCall<T>(T, Delegate) PersistentCall
Ensures that 'e' isn't null and adds 'method' to its UltEvents.UltEventBase.PersistentCallsList.
Inherited from UltEventBase
static
CacheParameter(Object) void
Sets the number of parameters passed to this event.
Inherited from UltEventBase
static
Clear() void
Clears all UltEvents.UltEventBase.PersistentCallsList and UltEvents.UltEventBase.DynamicCallsBase registered to this event.
Inherited from UltEventBase
CopyFrom(UltEventBase) void
Copies the contents of this the 'target' event to this event.
Inherited from UltEventBase
Invoke() void
Invokes all UltEvents.UltEvent.PersistentCalls then all UltEvents.UltEvent.DynamicCalls.

See also: and .
InvokePersistentCalls() void
Invokes all UltEvents.UltEventBase.PersistentCallsList registered to this event.
Inherited from UltEventBase
InvokeSafe() void
Invokes all UltEvents.UltEvent.PersistentCalls then all UltEvents.UltEvent.DynamicCalls inside a try/catch block which logs any exceptions that are thrown.

See also: and .
OnDynamicCallsChanged() void
Clears the cached invocation list of UltEvents.UltEventBase.DynamicCallsBase.
Inherited from UltEventBase
RemoveDynamicCall(UltEvent, Action) void
If 'e' isn't null, this method removes 'method' from its UltEvents.UltEvent.DynamicCalls.
static
RemovePersistentCall(Delegate) void
Remove the specified 'method from the persistent call list.
Inherited from UltEventBase
RemovePersistentCall(UltEventBase, Action) void
If 'e' isn't null, this method removes 'method' from its UltEvents.UltEventBase.PersistentCallsList.
Inherited from UltEventBase
static
RemovePersistentCall(UltEventBase, Delegate) void
If 'e' isn't null, this method removes 'method' from its UltEvents.UltEventBase.PersistentCallsList.
Inherited from UltEventBase
static
ToString() string
Returns a description of this event.
Inherited from UltEventBase
ToString(StringBuilder) void
Appends a description of this event.
Inherited from UltEventBase

Operators

Name Value Summary
implicit operator UltEvent(Action) UltEvent
operator -(UltEvent, Action) UltEvent
operator +(UltEvent, Action) UltEvent

Extension Methods

Name Value Summary
InvokeX() void
Calls e.Invoke if it isn't null.

See also: and .