Class EventChannel
Event channels are used to send and receive event messages.
Implements
Inherited Members
Object.InstantiateAsync<T>(T)
Object.InstantiateAsync<T>(T, Transform)
Object.InstantiateAsync<T>(T, Vector3, Quaternion)
Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
Object.Instantiate<T>(T, InstantiateParameters)
Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Namespace: Unity.Behavior
Assembly: Unity.Behavior.dll
Syntax
public abstract class EventChannel : EventChannelBase, IEventHandlerWithoutNotify
Methods
CreateEventHandler(BlackboardVariable[], Action)
Creates an event handler for the channel.
Declaration
public override Delegate CreateEventHandler(BlackboardVariable[] vars, Action callback)
Parameters
Type | Name | Description |
---|---|---|
BlackboardVariable[] | vars | The Blackboard Variables which will receive the data for the message. |
Action | callback | The callback to be called for the event. |
Returns
Type | Description |
---|---|
Delegate | The created event handler. |
Overrides
CreateEventHandlerWithoutNotify(BlackboardVariable[], Action)
Creates an event handler for the channel. Version without notifying OnValueChange for StartOnEvent.TriggerBehavior.Queue.
Declaration
public virtual Delegate CreateEventHandlerWithoutNotify(BlackboardVariable[] vars, Action callback)
Parameters
Type | Name | Description |
---|---|---|
BlackboardVariable[] | vars | The Blackboard Variables which will receive the data for the message. |
Action | callback | The callback to be called for the event. |
Returns
Type | Description |
---|---|
Delegate | The created event handler. |
RegisterListener(Delegate)
Registers a listener to the channel.
Declaration
public override void RegisterListener(Delegate del)
Parameters
Type | Name | Description |
---|---|---|
Delegate | del |
Overrides
SendEventMessage()
Send an event message on the channel.
Declaration
public void SendEventMessage()
SendEventMessage(BlackboardVariable[])
Sends an event message on the channel.
Declaration
public override void SendEventMessage(BlackboardVariable[] messageData)
Parameters
Type | Name | Description |
---|---|---|
BlackboardVariable[] | messageData | The Blackboard Variables holding the data for the message. |
Overrides
UnregisterListener(Delegate)
Unregisters a listener from the channel.
Declaration
public override void UnregisterListener(Delegate del)
Parameters
Type | Name | Description |
---|---|---|
Delegate | del |
Overrides
Events
Event
Occurs when the event channel raises an event.
Declaration
public event EventChannel.EventHandlerDelegate Event
Event Type
Type | Description |
---|---|
EventChannel.EventHandlerDelegate |