Struct MessageContext | Data Flow Graph | 0.19.0-preview.7
docs.unity3d.com
    Show / Hide Table of Contents

    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
    ValueType.Equals(Object)
    ValueType.GetHashCode()
    ValueType.ToString()
    Object.Equals(Object, Object)
    Object.GetType()
    Object.ReferenceEquals(Object, Object)
    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
    IContext<TSelf>.Handle

    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
    IContext<TSelf>.Set

    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

    Extension Methods

    CommonContextAPI.EmitMessage<TContext, T, TNodeDefinition>(ref TContext, MessageOutput<TNodeDefinition, T>, T)
    CommonContextAPI.EmitMessage<TContext, T, TNodeDefinition>(ref TContext, PortArray<MessageOutput<TNodeDefinition, T>>, Int32, T)
    CommonContextAPI.UpdateKernelBuffers<TContext, TGraphKernel>(ref TContext, TGraphKernel)
    CommonContextAPI.UploadRequest<TContext, T>(ref TContext, NativeArray<T>, BufferUploadMethod)
    CommonContextAPI.UpdateKernelData<TContext, TKernelData>(ref TContext, TKernelData)
    CommonContextAPI.RegisterForUpdate<TContext>(ref TContext)
    CommonContextAPI.RemoveFromUpdate<TContext>(ref TContext)
    CommonContextAPI.SetKernelBufferSize<TContext, TGraphKernel>(ref TContext, TGraphKernel)
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023