Struct MessageContext
A context provided to a node's Unity.DataFlowGraph.NodeDefinition.OnMessage``1(Unity.DataFlowGraph.MessageContext@,``0@) implementation which is invoked when a node receives a message on one of their MessageInputs.
Inherited Members
Namespace: Unity.DataFlowGraph
Syntax
public struct MessageContext : IContext<MessageContext>
Properties
ArrayIndex
If the above port ID corresponds to a PortArray<TPort>, this is the array index on which the message is being received.
Declaration
public ushort ArrayIndex { get; }
Property Value
| Type | Description |
|---|---|
| UInt16 |
Handle
A handle to the node receiving a message.
Declaration
public NodeHandle Handle { get; }
Property Value
| Type | Description |
|---|---|
| NodeHandle |
Implements
Port
The port ID of the MessageInput<TDefinition, TMsg> on which the message is being received.
Declaration
public InputPortID Port { get; }
Property Value
| Type | Description |
|---|---|
| InputPortID |
Set
The NodeSetAPI associated with this context.
Declaration
public NodeSetAPI Set { get; }
Property Value
| Type | Description |
|---|---|
| NodeSetAPI |
Implements
Operators
Implicit(MessageContext to CommonContext)
Conversion operator for common API shared with other contexts.
Declaration
public static implicit operator CommonContext(in MessageContext ctx)
Parameters
| Type | Name | Description |
|---|---|---|
| MessageContext | ctx |
Returns
| Type | Description |
|---|---|
| CommonContext |