Class NodeSet | Data Flow Graph | 0.11.10-preview
docs.unity3d.com
    Show / Hide Table of Contents

    Class NodeSet

    A node set is a set of instantiated user nodes connected together in some particular way, although not necessarily completely connected. Nodes can communicate through flowing data or messages, and the execution pattern is defined from the connections you establish. NodeDefinition<TNodeData> Create<TDefinition>() Connect(NodeHandle, OutputPortID, NodeHandle, InputPortID) Update()

    Inheritance
    Object
    NodeSet
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Unity.DataFlowGraph
    Syntax
    public class NodeSet : IDisposable

    Constructors

    NodeSet()

    Construct a node set. Remember to dispose it. Dispose()

    Declaration
    public NodeSet()

    Properties

    RendererModel

    The render execution scheduling mode use for launching the processing of IGraphKernel<TKernelData, TKernelPortDefinition>s in the node set. Update()

    Declaration
    public RenderExecutionModel RendererModel { get; set; }
    Property Value
    Type Description
    RenderExecutionModel
    Remarks

    Changing this can drastically alter the execution runtime of your graph. The best choice largely depends on the topological layout of the graph in question.

    Methods

    Adapt(NodeHandle)

    Declaration
    public NodeAdapter Adapt(NodeHandle n)
    Parameters
    Type Name Description
    NodeHandle n
    Returns
    Type Description
    NodeAdapter

    Adapt<TDefinition>(NodeHandle<TDefinition>)

    Declaration
    public NodeAdapter<TDefinition> Adapt<TDefinition>(NodeHandle<TDefinition> n)
        where TDefinition : INodeDefinition, new()
    Parameters
    Type Name Description
    NodeHandle<TDefinition> n
    Returns
    Type Description
    NodeAdapter<TDefinition>
    Type Parameters
    Name Description
    TDefinition

    As<TDefinition>(NodeHandle)

    Returns a nullable strongly typed node handle, which is valid if the node is a TDefinition. Is<TDefinition>(NodeHandle)

    Declaration
    public NodeHandle<TDefinition>? As<TDefinition>(NodeHandle handle)
        where TDefinition : INodeDefinition
    Parameters
    Type Name Description
    NodeHandle handle
    Returns
    Type Description
    Nullable<NodeHandle<TDefinition>>
    Type Parameters
    Name Description
    TDefinition
    Exceptions
    Type Condition
    ArgumentException

    If the handle does not refer to a valid instance.

    CastHandle<TDefinition>(NodeHandle)

    Casts a untyped node handle to a strongly typed version. Is<TDefinition>(NodeHandle)

    Declaration
    public NodeHandle<TDefinition> CastHandle<TDefinition>(NodeHandle handle)
        where TDefinition : INodeDefinition
    Parameters
    Type Name Description
    NodeHandle handle
    Returns
    Type Description
    NodeHandle<TDefinition>
    Type Parameters
    Name Description
    TDefinition
    Exceptions
    Type Condition
    ArgumentException

    If the handle does not refer to a valid instance.

    InvalidCastException

    If the handle is not a TDefinition.

    Connect(NodeHandle, OutputPortID, NodeHandle, InputPortID)

    Create a persistent connection between an output port on the source node and an input port of matching type on the destination node.

    Declaration
    public void Connect(NodeHandle sourceHandle, OutputPortID sourcePort, NodeHandle destHandle, InputPortID destinationPort)
    Parameters
    Type Name Description
    NodeHandle sourceHandle
    OutputPortID sourcePort
    NodeHandle destHandle
    InputPortID destinationPort
    Remarks

    Multiple connections to a single DataInput<TDefinition, TType> on a node are not permitted.

    Exceptions
    Type Condition
    InvalidOperationException

    Thrown if the request is invalid.

    ArgumentException

    Thrown if the destination input port is already connected.

    Connect(NodeHandle, OutputPortID, NodeHandle, InputPortID, UInt16)

    Overload of Connect(NodeHandle, OutputPortID, NodeHandle, InputPortID) targeting a destination port array with an index parameter.

    Declaration
    public void Connect(NodeHandle sourceHandle, OutputPortID sourcePort, NodeHandle destHandle, InputPortID destinationPortArray, ushort index)
    Parameters
    Type Name Description
    NodeHandle sourceHandle
    OutputPortID sourcePort
    NodeHandle destHandle
    InputPortID destinationPortArray
    UInt16 index
    Exceptions
    Type Condition
    IndexOutOfRangeException

    Thrown if the index is out of range with respect to the port array.

    Connect<TTask>(NodeHandle, OutputPortID, NodeInterfaceLink<TTask>)

    Declaration
    public void Connect<TTask>(NodeHandle sourceHandle, OutputPortID sourcePort, NodeInterfaceLink<TTask> destHandle)
        where TTask : ITaskPort<TTask>
    Parameters
    Type Name Description
    NodeHandle sourceHandle
    OutputPortID sourcePort
    NodeInterfaceLink<TTask> destHandle
    Type Parameters
    Name Description
    TTask

    Connect<TType, TSource, TDestination>(NodeHandle<TSource>, DataOutput<TSource, TType>, NodeHandle<TDestination>, DataInput<TDestination, TType>)

    See Connect(NodeHandle, OutputPortID, NodeHandle, InputPortID)

    Declaration
    public void Connect<TType, TSource, TDestination>(NodeHandle<TSource> sourceHandle, DataOutput<TSource, TType> sourcePort, NodeHandle<TDestination> destHandle, DataInput<TDestination, TType> destPort)
        where TType : struct where TSource : INodeDefinition where TDestination : INodeDefinition
    Parameters
    Type Name Description
    NodeHandle<TSource> sourceHandle
    DataOutput<TSource, TType> sourcePort
    NodeHandle<TDestination> destHandle
    DataInput<TDestination, TType> destPort
    Type Parameters
    Name Description
    TType
    TSource
    TDestination

    Connect<TType, TSource, TDestination>(NodeHandle<TSource>, DataOutput<TSource, TType>, NodeHandle<TDestination>, PortArray<DataInput<TDestination, TType>>, UInt16)

    Overload of Connect(NodeHandle, OutputPortID, NodeHandle, InputPortID) targeting a destination port array with an index parameter.

    Declaration
    public void Connect<TType, TSource, TDestination>(NodeHandle<TSource> sourceHandle, DataOutput<TSource, TType> sourcePort, NodeHandle<TDestination> destHandle, PortArray<DataInput<TDestination, TType>> destPortArray, ushort index)
        where TType : struct where TSource : INodeDefinition where TDestination : INodeDefinition
    Parameters
    Type Name Description
    NodeHandle<TSource> sourceHandle
    DataOutput<TSource, TType> sourcePort
    NodeHandle<TDestination> destHandle
    PortArray<DataInput<TDestination, TType>> destPortArray
    UInt16 index
    Type Parameters
    Name Description
    TType
    TSource
    TDestination
    Exceptions
    Type Condition
    IndexOutOfRangeException

    Thrown if the index is out of range with respect to the port array.

    Connect<TMsg, TSource, TDestination>(NodeHandle<TSource>, MessageOutput<TSource, TMsg>, NodeHandle<TDestination>, MessageInput<TDestination, TMsg>)

    See Connect(NodeHandle, OutputPortID, NodeHandle, InputPortID)

    Declaration
    public void Connect<TMsg, TSource, TDestination>(NodeHandle<TSource> sourceHandle, MessageOutput<TSource, TMsg> sourcePort, NodeHandle<TDestination> destHandle, MessageInput<TDestination, TMsg> destPort)
        where TSource : INodeDefinition where TDestination : INodeDefinition, IMsgHandler<TMsg>
    Parameters
    Type Name Description
    NodeHandle<TSource> sourceHandle
    MessageOutput<TSource, TMsg> sourcePort
    NodeHandle<TDestination> destHandle
    MessageInput<TDestination, TMsg> destPort
    Type Parameters
    Name Description
    TMsg
    TSource
    TDestination

    Connect<TMsg, TSource, TDestination>(NodeHandle<TSource>, MessageOutput<TSource, TMsg>, NodeHandle<TDestination>, PortArray<MessageInput<TDestination, TMsg>>, UInt16)

    Overload of Connect(NodeHandle, OutputPortID, NodeHandle, InputPortID) targeting a destination port array with an index parameter.

    Declaration
    public void Connect<TMsg, TSource, TDestination>(NodeHandle<TSource> sourceHandle, MessageOutput<TSource, TMsg> sourcePort, NodeHandle<TDestination> destHandle, PortArray<MessageInput<TDestination, TMsg>> destPortArray, ushort index)
        where TSource : INodeDefinition where TDestination : INodeDefinition, IMsgHandler<TMsg>
    Parameters
    Type Name Description
    NodeHandle<TSource> sourceHandle
    MessageOutput<TSource, TMsg> sourcePort
    NodeHandle<TDestination> destHandle
    PortArray<MessageInput<TDestination, TMsg>> destPortArray
    UInt16 index
    Type Parameters
    Name Description
    TMsg
    TSource
    TDestination
    Exceptions
    Type Condition
    IndexOutOfRangeException

    Thrown if the index is out of range with respect to the port array.

    Connect<TTask, TType, TSource, TDestination>(NodeHandle<TSource>, DataOutput<TSource, TType>, NodeInterfaceLink<TTask, TDestination>)

    Declaration
    public void Connect<TTask, TType, TSource, TDestination>(NodeHandle<TSource> sourceHandle, DataOutput<TSource, TType> sourcePort, NodeInterfaceLink<TTask, TDestination> destHandle)
        where TTask : ITaskPort<TTask> where TType : struct where TSource : INodeDefinition where TDestination : INodeDefinition, TTask
    Parameters
    Type Name Description
    NodeHandle<TSource> sourceHandle
    DataOutput<TSource, TType> sourcePort
    NodeInterfaceLink<TTask, TDestination> destHandle
    Type Parameters
    Name Description
    TTask
    TType
    TSource
    TDestination

    Connect<TDSLHandler, TDSL, TSource, TDestination>(NodeHandle<TSource>, DSLOutput<TSource, TDSLHandler, TDSL>, NodeHandle<TDestination>, DSLInput<TDestination, TDSLHandler, TDSL>)

    See Connect(NodeHandle, OutputPortID, NodeHandle, InputPortID)

    Declaration
    public void Connect<TDSLHandler, TDSL, TSource, TDestination>(NodeHandle<TSource> sourceHandle, DSLOutput<TSource, TDSLHandler, TDSL> sourcePort, NodeHandle<TDestination> destHandle, DSLInput<TDestination, TDSLHandler, TDSL> destPort)
        where TDSLHandler : DSLHandler<TDSL>, new()
        where TDSL : class where TSource : INodeDefinition, TDSL where TDestination : INodeDefinition, TDSL
    Parameters
    Type Name Description
    NodeHandle<TSource> sourceHandle
    DSLOutput<TSource, TDSLHandler, TDSL> sourcePort
    NodeHandle<TDestination> destHandle
    DSLInput<TDestination, TDSLHandler, TDSL> destPort
    Type Parameters
    Name Description
    TDSLHandler
    TDSL
    TSource
    TDestination

    Connect<TTask, TMsg, TSource, TDestination>(NodeHandle<TSource>, MessageOutput<TSource, TMsg>, NodeInterfaceLink<TTask, TDestination>)

    Declaration
    public void Connect<TTask, TMsg, TSource, TDestination>(NodeHandle<TSource> sourceHandle, MessageOutput<TSource, TMsg> sourcePort, NodeInterfaceLink<TTask, TDestination> destHandle)
        where TTask : ITaskPort<TTask> where TSource : INodeDefinition where TDestination : TTask, INodeDefinition, IMsgHandler<TMsg>
    Parameters
    Type Name Description
    NodeHandle<TSource> sourceHandle
    MessageOutput<TSource, TMsg> sourcePort
    NodeInterfaceLink<TTask, TDestination> destHandle
    Type Parameters
    Name Description
    TTask
    TMsg
    TSource
    TDestination

    Connect<TTask, TDSLHandler, TDSL, TSource, TDestination>(NodeHandle<TSource>, DSLOutput<TSource, TDSLHandler, TDSL>, NodeInterfaceLink<TTask, TDestination>)

    Declaration
    public void Connect<TTask, TDSLHandler, TDSL, TSource, TDestination>(NodeHandle<TSource> sourceHandle, DSLOutput<TSource, TDSLHandler, TDSL> sourcePort, NodeInterfaceLink<TTask, TDestination> destHandle)
        where TTask : ITaskPort<TTask> where TDSLHandler : DSLHandler<TDSL>, new()
        where TDSL : class where TSource : INodeDefinition, TDSL where TDestination : TTask, INodeDefinition
    Parameters
    Type Name Description
    NodeHandle<TSource> sourceHandle
    DSLOutput<TSource, TDSLHandler, TDSL> sourcePort
    NodeInterfaceLink<TTask, TDestination> destHandle
    Type Parameters
    Name Description
    TTask
    TDSLHandler
    TDSL
    TSource
    TDestination

    Create<TDefinition>()

    Instantiates a particular type of node. If this is the first time this node type is created, the TDefinition is instantiated as well.

    Remember to destroy the node again. Destroy(NodeHandle)

    Declaration
    public NodeHandle<TDefinition> Create<TDefinition>()
        where TDefinition : INodeDefinition, new()
    Returns
    Type Description
    NodeHandle<TDefinition>

    A handle to a node, that uniquely identifies the instantiated node. The handle returned is "strongly" typed in that it is verified to refer to such a node type - see NodeHandle<TDefinition> for more information. This handle is the primary interface for all APIs on nodes. After the node has been destroyed, any copy of this handle is invalidated, see Exists(NodeHandle).

    Type Parameters
    Name Description
    TDefinition
    Exceptions
    Type Condition
    InvalidNodeDefinitionException

    Thrown if the TDefinition is not a valid node definition.

    CreateGraphValue<T>(NodeHandle, OutputPortID)

    Creates a graph value from an untyped node and source. See documentation for CreateGraphValue<T, TDefinition>(NodeHandle<TDefinition>, DataOutput<TDefinition, T>).

    Declaration
    public GraphValue<T> CreateGraphValue<T>(NodeHandle handle, OutputPortID output)
        where T : struct
    Parameters
    Type Name Description
    NodeHandle handle
    OutputPortID output
    Returns
    Type Description
    GraphValue<T>
    Type Parameters
    Name Description
    T
    Exceptions
    Type Condition
    ArgumentException

    Thrown if the target node is invalid or disposed

    InvalidOperationException

    Thrown if the output port is not of a data type

    IndexOutOfRangeException

    Thrown if the output port is out of bounds

    CreateGraphValue<T, TDefinition>(NodeHandle<TDefinition>, DataOutput<TDefinition, T>)

    Creates a tap point at a specific output location in the graph. Using graph values you can read back state and results from graph kernels, either from the main thread using GetValueBlocking<T>(GraphValue<T>) or asynchronously using GraphValueResolver.

    Declaration
    public GraphValue<T> CreateGraphValue<T, TDefinition>(NodeHandle<TDefinition> node, DataOutput<TDefinition, T> output)
        where T : struct where TDefinition : INodeDefinition
    Parameters
    Type Name Description
    NodeHandle<TDefinition> node
    DataOutput<TDefinition, T> output
    Returns
    Type Description
    GraphValue<T>
    Type Parameters
    Name Description
    T
    TDefinition
    Remarks

    You will not be able to read contents of the output until after the next issue of Update().

    Exceptions
    Type Condition
    ArgumentException

    Thrown if the target node is invalid or disposed

    IndexOutOfRangeException

    Thrown if the output port is out of bounds

    See Also
    GetGraphValueResolver(out JobHandle)
    IKernelPortDefinition
    IGraphKernel<TKernelData, TKernelPortDefinition>

    Destroy(NodeHandle)

    Destroys a node, identified by the handle. This invokes Destroy(NodeHandle) if implemented.

    Declaration
    public void Destroy(NodeHandle handle)
    Parameters
    Type Name Description
    NodeHandle handle
    Exceptions
    Type Condition
    ArgumentException

    Thrown if the node is already destroyed or invalid.

    Destroy(NodeHandle[])

    Convenience function for destroying a range of nodes. Destroy(NodeHandle)

    Declaration
    public void Destroy(params NodeHandle[] handles)
    Parameters
    Type Name Description
    NodeHandle[] handles

    Disconnect(NodeHandle, OutputPortID, NodeHandle, InputPortID)

    Removes a previously made connection between an output port on the source node and an input port on the destination node.

    Declaration
    public void Disconnect(NodeHandle sourceHandle, OutputPortID sourcePort, NodeHandle destHandle, InputPortID destinationPort)
    Parameters
    Type Name Description
    NodeHandle sourceHandle
    OutputPortID sourcePort
    NodeHandle destHandle
    InputPortID destinationPort
    Exceptions
    Type Condition
    InvalidOperationException

    Thrown if the request is invalid.

    ArgumentException

    Thrown if the connection did not previously exist.

    Disconnect(NodeHandle, OutputPortID, NodeHandle, InputPortID, UInt16)

    Overload of Disconnect(NodeHandle, OutputPortID, NodeHandle, InputPortID) targeting a destination port array with an index parameter.

    Declaration
    public void Disconnect(NodeHandle sourceHandle, OutputPortID sourcePort, NodeHandle destHandle, InputPortID destinationPortArray, ushort index)
    Parameters
    Type Name Description
    NodeHandle sourceHandle
    OutputPortID sourcePort
    NodeHandle destHandle
    InputPortID destinationPortArray
    UInt16 index
    Exceptions
    Type Condition
    IndexOutOfRangeException

    Thrown if the index is out of range with respect to the port array.

    Disconnect<TTask>(NodeHandle, OutputPortID, NodeInterfaceLink<TTask>)

    Declaration
    public void Disconnect<TTask>(NodeHandle sourceHandle, OutputPortID sourcePort, NodeInterfaceLink<TTask> destHandle)
        where TTask : ITaskPort<TTask>
    Parameters
    Type Name Description
    NodeHandle sourceHandle
    OutputPortID sourcePort
    NodeInterfaceLink<TTask> destHandle
    Type Parameters
    Name Description
    TTask

    Disconnect<TType, TSource, TDestination>(NodeHandle<TSource>, DataOutput<TSource, TType>, NodeHandle<TDestination>, DataInput<TDestination, TType>)

    See Disconnect(NodeHandle, OutputPortID, NodeHandle, InputPortID)

    Declaration
    public void Disconnect<TType, TSource, TDestination>(NodeHandle<TSource> sourceHandle, DataOutput<TSource, TType> sourcePort, NodeHandle<TDestination> destHandle, DataInput<TDestination, TType> destPort)
        where TType : struct where TSource : INodeDefinition where TDestination : INodeDefinition
    Parameters
    Type Name Description
    NodeHandle<TSource> sourceHandle
    DataOutput<TSource, TType> sourcePort
    NodeHandle<TDestination> destHandle
    DataInput<TDestination, TType> destPort
    Type Parameters
    Name Description
    TType
    TSource
    TDestination

    Disconnect<TType, TSource, TDestination>(NodeHandle<TSource>, DataOutput<TSource, TType>, NodeHandle<TDestination>, PortArray<DataInput<TDestination, TType>>, UInt16)

    Overload of Disconnect(NodeHandle, OutputPortID, NodeHandle, InputPortID) targeting a destination port array with an index parameter.

    Declaration
    public void Disconnect<TType, TSource, TDestination>(NodeHandle<TSource> sourceHandle, DataOutput<TSource, TType> sourcePort, NodeHandle<TDestination> destHandle, PortArray<DataInput<TDestination, TType>> destPortArray, ushort index)
        where TType : struct where TSource : INodeDefinition where TDestination : INodeDefinition
    Parameters
    Type Name Description
    NodeHandle<TSource> sourceHandle
    DataOutput<TSource, TType> sourcePort
    NodeHandle<TDestination> destHandle
    PortArray<DataInput<TDestination, TType>> destPortArray
    UInt16 index
    Type Parameters
    Name Description
    TType
    TSource
    TDestination
    Exceptions
    Type Condition
    IndexOutOfRangeException

    Thrown if the index is out of range with respect to the port array.

    Disconnect<TMsg, TSource, TDestination>(NodeHandle<TSource>, MessageOutput<TSource, TMsg>, NodeHandle<TDestination>, MessageInput<TDestination, TMsg>)

    See Disconnect(NodeHandle, OutputPortID, NodeHandle, InputPortID)

    Declaration
    public void Disconnect<TMsg, TSource, TDestination>(NodeHandle<TSource> sourceHandle, MessageOutput<TSource, TMsg> sourcePort, NodeHandle<TDestination> destHandle, MessageInput<TDestination, TMsg> destPort)
        where TSource : INodeDefinition where TDestination : INodeDefinition, IMsgHandler<TMsg>
    Parameters
    Type Name Description
    NodeHandle<TSource> sourceHandle
    MessageOutput<TSource, TMsg> sourcePort
    NodeHandle<TDestination> destHandle
    MessageInput<TDestination, TMsg> destPort
    Type Parameters
    Name Description
    TMsg
    TSource
    TDestination

    Disconnect<TMsg, TSource, TDestination>(NodeHandle<TSource>, MessageOutput<TSource, TMsg>, NodeHandle<TDestination>, PortArray<MessageInput<TDestination, TMsg>>, UInt16)

    Overload of Disconnect(NodeHandle, OutputPortID, NodeHandle, InputPortID) targeting a destination port array with an index parameter.

    Declaration
    public void Disconnect<TMsg, TSource, TDestination>(NodeHandle<TSource> sourceHandle, MessageOutput<TSource, TMsg> sourcePort, NodeHandle<TDestination> destHandle, PortArray<MessageInput<TDestination, TMsg>> destPortArray, ushort index)
        where TSource : INodeDefinition where TDestination : INodeDefinition, IMsgHandler<TMsg>
    Parameters
    Type Name Description
    NodeHandle<TSource> sourceHandle
    MessageOutput<TSource, TMsg> sourcePort
    NodeHandle<TDestination> destHandle
    PortArray<MessageInput<TDestination, TMsg>> destPortArray
    UInt16 index
    Type Parameters
    Name Description
    TMsg
    TSource
    TDestination
    Exceptions
    Type Condition
    IndexOutOfRangeException

    Thrown if the index is out of range with respect to the port array.

    Disconnect<TTask, TType, TSource, TDestination>(NodeHandle<TSource>, DataOutput<TSource, TType>, NodeInterfaceLink<TTask, TDestination>)

    Declaration
    public void Disconnect<TTask, TType, TSource, TDestination>(NodeHandle<TSource> sourceHandle, DataOutput<TSource, TType> sourcePort, NodeInterfaceLink<TTask, TDestination> destHandle)
        where TTask : ITaskPort<TTask> where TType : struct where TSource : INodeDefinition where TDestination : INodeDefinition, TTask
    Parameters
    Type Name Description
    NodeHandle<TSource> sourceHandle
    DataOutput<TSource, TType> sourcePort
    NodeInterfaceLink<TTask, TDestination> destHandle
    Type Parameters
    Name Description
    TTask
    TType
    TSource
    TDestination

    Disconnect<TDSLHandler, TDSL, TSource, TDestination>(NodeHandle<TSource>, DSLOutput<TSource, TDSLHandler, TDSL>, NodeHandle<TDestination>, DSLInput<TDestination, TDSLHandler, TDSL>)

    See Disconnect(NodeHandle, OutputPortID, NodeHandle, InputPortID)

    Declaration
    public void Disconnect<TDSLHandler, TDSL, TSource, TDestination>(NodeHandle<TSource> sourceHandle, DSLOutput<TSource, TDSLHandler, TDSL> sourcePort, NodeHandle<TDestination> destHandle, DSLInput<TDestination, TDSLHandler, TDSL> destPort)
        where TDSLHandler : DSLHandler<TDSL>, new()
        where TDSL : class where TSource : INodeDefinition, TDSL where TDestination : INodeDefinition, TDSL
    Parameters
    Type Name Description
    NodeHandle<TSource> sourceHandle
    DSLOutput<TSource, TDSLHandler, TDSL> sourcePort
    NodeHandle<TDestination> destHandle
    DSLInput<TDestination, TDSLHandler, TDSL> destPort
    Type Parameters
    Name Description
    TDSLHandler
    TDSL
    TSource
    TDestination

    Disconnect<TTask, TMsg, TSource, TDestination>(NodeHandle<TSource>, MessageOutput<TSource, TMsg>, NodeInterfaceLink<TTask, TDestination>)

    Declaration
    public void Disconnect<TTask, TMsg, TSource, TDestination>(NodeHandle<TSource> sourceHandle, MessageOutput<TSource, TMsg> sourcePort, NodeInterfaceLink<TTask, TDestination> destHandle)
        where TTask : ITaskPort<TTask> where TSource : INodeDefinition where TDestination : INodeDefinition, TTask, IMsgHandler<TMsg>
    Parameters
    Type Name Description
    NodeHandle<TSource> sourceHandle
    MessageOutput<TSource, TMsg> sourcePort
    NodeInterfaceLink<TTask, TDestination> destHandle
    Type Parameters
    Name Description
    TTask
    TMsg
    TSource
    TDestination

    Disconnect<TTask, TDSLHandler, TDSL, TSource, TDestination>(NodeHandle<TSource>, DSLOutput<TSource, TDSLHandler, TDSL>, NodeInterfaceLink<TTask, TDestination>)

    Declaration
    public void Disconnect<TTask, TDSLHandler, TDSL, TSource, TDestination>(NodeHandle<TSource> sourceHandle, DSLOutput<TSource, TDSLHandler, TDSL> sourcePort, NodeInterfaceLink<TTask, TDestination> destHandle)
        where TTask : ITaskPort<TTask> where TDSLHandler : DSLHandler<TDSL>, new()
        where TDSL : class where TSource : INodeDefinition, TDSL where TDestination : INodeDefinition, TDSL, TTask
    Parameters
    Type Name Description
    NodeHandle<TSource> sourceHandle
    DSLOutput<TSource, TDSLHandler, TDSL> sourcePort
    NodeInterfaceLink<TTask, TDestination> destHandle
    Type Parameters
    Name Description
    TTask
    TDSLHandler
    TDSL
    TSource
    TDestination

    DisconnectAndRetainValue(NodeHandle, OutputPortID, NodeHandle, InputPortID)

    Removes a previously made connection between an output data port on the source node and an input data port on the destination node (see Disconnect(NodeHandle, OutputPortID, NodeHandle, InputPortID)) but preserves the last data contents that was transmitted along the connection at the destination node's data input port. The data persists until a new connection is made to that data input port. SetData<TType>(NodeHandle, InputPortID, TType)

    Declaration
    public void DisconnectAndRetainValue(NodeHandle sourceHandle, OutputPortID sourcePort, NodeHandle destHandle, InputPortID destinationPort)
    Parameters
    Type Name Description
    NodeHandle sourceHandle
    OutputPortID sourcePort
    NodeHandle destHandle
    InputPortID destinationPort
    Exceptions
    Type Condition
    InvalidOperationException

    Thrown if the request is invalid.

    ArgumentException

    Thrown if the connection did not previously exist.

    DisconnectAndRetainValue(NodeHandle, OutputPortID, NodeHandle, InputPortID, UInt16)

    Overload of DisconnectAndRetainValue(NodeHandle, OutputPortID, NodeHandle, InputPortID) targeting a port array with an index parameter.

    Declaration
    public void DisconnectAndRetainValue(NodeHandle sourceHandle, OutputPortID sourcePort, NodeHandle destHandle, InputPortID destinationPortArray, ushort index)
    Parameters
    Type Name Description
    NodeHandle sourceHandle
    OutputPortID sourcePort
    NodeHandle destHandle
    InputPortID destinationPortArray
    UInt16 index
    Exceptions
    Type Condition
    IndexOutOfRangeException

    Thrown if the index is out of range with respect to the port array.

    DisconnectAndRetainValue<TType, TSource, TDestination>(NodeHandle<TSource>, DataOutput<TSource, TType>, NodeHandle<TDestination>, DataInput<TDestination, TType>)

    See DisconnectAndRetainValue(NodeHandle, OutputPortID, NodeHandle, InputPortID)

    Declaration
    public void DisconnectAndRetainValue<TType, TSource, TDestination>(NodeHandle<TSource> sourceHandle, DataOutput<TSource, TType> sourcePort, NodeHandle<TDestination> destHandle, DataInput<TDestination, TType> destPort)
        where TType : struct where TSource : INodeDefinition, new()
        where TDestination : INodeDefinition, new()
    Parameters
    Type Name Description
    NodeHandle<TSource> sourceHandle
    DataOutput<TSource, TType> sourcePort
    NodeHandle<TDestination> destHandle
    DataInput<TDestination, TType> destPort
    Type Parameters
    Name Description
    TType
    TSource
    TDestination

    DisconnectAndRetainValue<TType, TSource, TDestination>(NodeHandle<TSource>, DataOutput<TSource, TType>, NodeHandle<TDestination>, PortArray<DataInput<TDestination, TType>>, UInt16)

    Overload of DisconnectAndRetainValue(NodeHandle, OutputPortID, NodeHandle, InputPortID) targeting a port array with an index parameter.

    Declaration
    public void DisconnectAndRetainValue<TType, TSource, TDestination>(NodeHandle<TSource> sourceHandle, DataOutput<TSource, TType> sourcePort, NodeHandle<TDestination> destHandle, PortArray<DataInput<TDestination, TType>> destPortArray, ushort index)
        where TType : struct where TSource : INodeDefinition, new()
        where TDestination : INodeDefinition, new()
    Parameters
    Type Name Description
    NodeHandle<TSource> sourceHandle
    DataOutput<TSource, TType> sourcePort
    NodeHandle<TDestination> destHandle
    PortArray<DataInput<TDestination, TType>> destPortArray
    UInt16 index
    Type Parameters
    Name Description
    TType
    TSource
    TDestination
    Exceptions
    Type Condition
    IndexOutOfRangeException

    Thrown if the index is out of range with respect to the port array.

    Dispose()

    Cleans up the node set, and releasing any resources associated with it.

    Declaration
    public void Dispose()
    Implements
    IDisposable.Dispose()
    Remarks

    It's expected that the node set is completely cleaned up, i.e. no nodes exist in the set, together with any GraphValue<T>.

    Exists(NodeHandle)

    Tests whether the supplied node handle refers to a currently valid node instance.

    Declaration
    public bool Exists(NodeHandle handle)
    Parameters
    Type Name Description
    NodeHandle handle
    Returns
    Type Description
    Boolean

    Finalize()

    Declaration
    protected void Finalize()

    GetDSLHandler<TDSLHandler>()

    Declaration
    public TDSLHandler GetDSLHandler<TDSLHandler>()
        where TDSLHandler : class, IDSLHandler
    Returns
    Type Description
    TDSLHandler
    Type Parameters
    Name Description
    TDSLHandler

    GetFunctionality(NodeHandle)

    Looks up the functionality interface for this handle. INodeFunctionality

    Declaration
    public INodeFunctionality GetFunctionality(NodeHandle handle)
    Parameters
    Type Name Description
    NodeHandle handle
    Returns
    Type Description
    INodeFunctionality
    Exceptions
    Type Condition
    ArgumentException

    Thrown if the node handle does not refer to a valid instance.

    GetFunctionality<TDefinition>()

    Looks up the specified functionality interface, creating it if it doesn't exist already.

    Declaration
    public TDefinition GetFunctionality<TDefinition>()
        where TDefinition : INodeDefinition, new()
    Returns
    Type Description
    TDefinition
    Type Parameters
    Name Description
    TDefinition
    Exceptions
    Type Condition
    InvalidNodeDefinitionException

    Thrown if the TDefinition is not a valid node definition.

    GetFunctionality<TDefinition>(NodeHandle<TDefinition>)

    Looks up the verified functionality interface for this handle. INodeFunctionality

    Declaration
    public TDefinition GetFunctionality<TDefinition>(NodeHandle<TDefinition> handle)
        where TDefinition : INodeDefinition, new()
    Parameters
    Type Name Description
    NodeHandle<TDefinition> handle
    Returns
    Type Description
    TDefinition
    Type Parameters
    Name Description
    TDefinition
    Exceptions
    Type Condition
    ArgumentException

    Thrown if the node handle does not refer to a valid instance.

    GetGraphValueResolver(out JobHandle)

    Returns a GraphValueResolver that can be used to asynchronously read back graph state and buffers in a job. Put the resolver on a job ("consumer"), and schedule it against the parameter resultDependency.

    Any job handles referencing the resolver must to be submitted back to the node set through InjectDependencyFromConsumer(JobHandle).

    Declaration
    public GraphValueResolver GetGraphValueResolver(out JobHandle resultDependency)
    Parameters
    Type Name Description
    JobHandle resultDependency

    Contains an aggregation of dependencies from the last Update() for any created graph values.

    Returns
    Type Description
    GraphValueResolver
    Remarks

    The returned resolver is only valid until the next Update() is issued, so call this function after every Update().

    The resolver does not need to be cleaned up from the user's side.

    GetValueBlocking<T>(GraphValue<T>)

    Fetches the last value from a node's DataOutput<TDefinition, TType> via a previously created graph value (see CreateGraphValue<T, TDefinition>(NodeHandle<TDefinition>, DataOutput<TDefinition, T>)).

    Declaration
    public T GetValueBlocking<T>(GraphValue<T> graphValue)
        where T : struct
    Parameters
    Type Name Description
    GraphValue<T> graphValue
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    Remarks

    This blocks execution in the calling thread until the last rendering of the given node has finished. If non-blocking behavior is desired, consider using a job in combination with a GraphValueResolver.

    Exceptions
    Type Condition
    ObjectDisposedException

    Thrown if the graph value is invalid or disposed, or the referenced node has been destroyed

    InjectDependencyFromConsumer(JobHandle)

    Injects external dependencies into this node set, so the next Update() synchronizes against consumers of any data from this node set.

    Declaration
    public void InjectDependencyFromConsumer(JobHandle handle)
    Parameters
    Type Name Description
    JobHandle handle
    See Also
    GetGraphValueResolver(out JobHandle)

    Is<TDefinition>(NodeHandle)

    Tests whether the node instance referred to by the handle is a TDefinition.

    Declaration
    public bool Is<TDefinition>(NodeHandle handle)
        where TDefinition : INodeDefinition
    Parameters
    Type Name Description
    NodeHandle handle
    Returns
    Type Description
    Boolean
    Type Parameters
    Name Description
    TDefinition

    ReleaseGraphValue<T>(GraphValue<T>)

    Releases a graph value previously created with CreateGraphValue<T, TDefinition>(NodeHandle<TDefinition>, DataOutput<TDefinition, T>).

    Declaration
    public void ReleaseGraphValue<T>(GraphValue<T> graphValue)
    Parameters
    Type Name Description
    GraphValue<T> graphValue
    Type Parameters
    Name Description
    T
    Exceptions
    Type Condition
    ObjectDisposedException

    Thrown if the graph value is invalid or disposed

    SendMessage<TMsg>(NodeHandle, InputPortID, TMsg)

    Send a message of a specific type to a message input port on a node.

    Declaration
    public void SendMessage<TMsg>(NodeHandle handle, InputPortID port, in TMsg msg)
    Parameters
    Type Name Description
    NodeHandle handle

    The node to be messaged.

    InputPortID port

    A MessageInput<TDefinition, TMsg> port on the given node.

    TMsg msg

    The content of the message to be delivered.

    Type Parameters
    Name Description
    TMsg

    The type of message data. Must correspond to the type of the given MessageInput<TDefinition, TMsg>.

    Exceptions
    Type Condition
    InvalidOperationException

    Thrown if the request is invalid.

    SendMessage<TMsg>(NodeHandle, InputPortID, UInt16, TMsg)

    Overload of targeting a port array with an index parameter.

    Declaration
    public void SendMessage<TMsg>(NodeHandle handle, InputPortID portArray, ushort index, in TMsg msg)
    Parameters
    Type Name Description
    NodeHandle handle
    InputPortID portArray
    UInt16 index
    TMsg msg
    Type Parameters
    Name Description
    TMsg
    Exceptions
    Type Condition
    IndexOutOfRangeException

    Thrown if the index is out of range with respect to the port array.

    SendMessage<TMsg, TDefinition>(NodeHandle<TDefinition>, MessageInput<TDefinition, TMsg>, TMsg)

    See

    Declaration
    public void SendMessage<TMsg, TDefinition>(NodeHandle<TDefinition> handle, MessageInput<TDefinition, TMsg> port, in TMsg msg)
        where TDefinition : INodeDefinition, IMsgHandler<TMsg>, new()
    Parameters
    Type Name Description
    NodeHandle<TDefinition> handle
    MessageInput<TDefinition, TMsg> port
    TMsg msg
    Type Parameters
    Name Description
    TMsg
    TDefinition

    SendMessage<TMsg, TDefinition>(NodeHandle<TDefinition>, PortArray<MessageInput<TDefinition, TMsg>>, UInt16, TMsg)

    Overload of targeting a port array with an index parameter.

    Declaration
    public void SendMessage<TMsg, TDefinition>(NodeHandle<TDefinition> handle, PortArray<MessageInput<TDefinition, TMsg>> portArray, ushort index, in TMsg msg)
        where TDefinition : INodeDefinition, IMsgHandler<TMsg>, new()
    Parameters
    Type Name Description
    NodeHandle<TDefinition> handle
    PortArray<MessageInput<TDefinition, TMsg>> portArray
    UInt16 index
    TMsg msg
    Type Parameters
    Name Description
    TMsg
    TDefinition
    Exceptions
    Type Condition
    IndexOutOfRangeException

    Thrown if the index is out of range with respect to the port array.

    SendMessage<TTask, TMsg>(NodeInterfaceLink<TTask>, TMsg)

    Declaration
    public void SendMessage<TTask, TMsg>(NodeInterfaceLink<TTask> handle, in TMsg msg)
        where TTask : ITaskPort<TTask>
    Parameters
    Type Name Description
    NodeInterfaceLink<TTask> handle
    TMsg msg
    Type Parameters
    Name Description
    TTask
    TMsg

    SendMessage<TTask, TMsg, TDestination>(NodeInterfaceLink<TTask, TDestination>, TMsg)

    Declaration
    public void SendMessage<TTask, TMsg, TDestination>(NodeInterfaceLink<TTask, TDestination> handle, in TMsg msg)
        where TTask : ITaskPort<TTask> where TDestination : TTask, INodeDefinition, IMsgHandler<TMsg>
    Parameters
    Type Name Description
    NodeInterfaceLink<TTask, TDestination> handle
    TMsg msg
    Type Parameters
    Name Description
    TTask
    TMsg
    TDestination

    SetBufferSize<TType>(NodeHandle, OutputPortID, TType)

    Set the size of a Buffer<T> appearing in a DataOutput<TDefinition, TType>. See for more information.

    Declaration
    public void SetBufferSize<TType>(NodeHandle handle, OutputPortID port, in TType requestedSize)
        where TType : struct
    Parameters
    Type Name Description
    NodeHandle handle
    OutputPortID port
    TType requestedSize
    Type Parameters
    Name Description
    TType
    Exceptions
    Type Condition
    ArgumentException

    If the handle does not refer to a valid instance.

    InvalidOperationException

    Thrown if the request is invalid.

    SetBufferSize<TDefinition, TType>(NodeHandle<TDefinition>, DataOutput<TDefinition, TType>, TType)

    Set the size of a Buffer<T> appearing in a DataOutput<TDefinition, TType>. If TType is itself a Buffer<T>, pass the result of SizeRequest(Int32) as the requestedSize argument.

    If TType is a struct containing one or multiple Buffer<T> instances, pass an instance of the struct as the requestedSize parameter with Buffer<T> instances within it having been set using SizeRequest(Int32). Any Buffer<T> instances within the given struct that have not been set using SizeRequest(Int32) will be unaffected by the call.

    Declaration
    public void SetBufferSize<TDefinition, TType>(NodeHandle<TDefinition> handle, DataOutput<TDefinition, TType> port, in TType requestedSize)
        where TDefinition : INodeDefinition where TType : struct
    Parameters
    Type Name Description
    NodeHandle<TDefinition> handle
    DataOutput<TDefinition, TType> port
    TType requestedSize
    Type Parameters
    Name Description
    TDefinition
    TType
    Exceptions
    Type Condition
    ArgumentException

    If the handle does not refer to a valid instance.

    InvalidOperationException

    Thrown if the request is invalid.

    SetData<TType>(NodeHandle, InputPortID, TType)

    Sets the data on an unconnected data input port on a node. The data will persist on the input until a connection is made to that input, or, it replaced by another call to .

    Declaration
    public void SetData<TType>(NodeHandle handle, InputPortID port, in TType data)
        where TType : struct
    Parameters
    Type Name Description
    NodeHandle handle

    The node on which data is to be set.

    InputPortID port

    A DataInput<TDefinition, TType> port on the given node.

    TType data

    The content of the data to be set.

    Type Parameters
    Name Description
    TType

    The type of data to be set. Must correspond to the type of the given DataInput<TDefinition, TType>.

    Remarks

    Note that Buffer<T> data is unsupported at this time.

    Exceptions
    Type Condition
    InvalidOperationException

    Thrown if the request is invalid.

    SetData<TType>(NodeHandle, InputPortID, UInt16, TType)

    Overload of targeting a port array with an index parameter.

    Declaration
    public void SetData<TType>(NodeHandle handle, InputPortID portArray, ushort index, in TType data)
        where TType : struct
    Parameters
    Type Name Description
    NodeHandle handle
    InputPortID portArray
    UInt16 index
    TType data
    Type Parameters
    Name Description
    TType
    Exceptions
    Type Condition
    IndexOutOfRangeException

    Thrown if the index is out of range with respect to the port array.

    SetData<TType, TDefinition>(NodeHandle<TDefinition>, DataInput<TDefinition, TType>, TType)

    See

    Declaration
    public void SetData<TType, TDefinition>(NodeHandle<TDefinition> handle, DataInput<TDefinition, TType> port, in TType data)
        where TType : struct where TDefinition : INodeDefinition, new()
    Parameters
    Type Name Description
    NodeHandle<TDefinition> handle
    DataInput<TDefinition, TType> port
    TType data
    Type Parameters
    Name Description
    TType
    TDefinition

    SetData<TType, TDefinition>(NodeHandle<TDefinition>, PortArray<DataInput<TDefinition, TType>>, UInt16, TType)

    Overload of targeting a port array with an index parameter.

    Declaration
    public void SetData<TType, TDefinition>(NodeHandle<TDefinition> handle, PortArray<DataInput<TDefinition, TType>> portArray, ushort index, in TType data)
        where TType : struct where TDefinition : INodeDefinition, new()
    Parameters
    Type Name Description
    NodeHandle<TDefinition> handle
    PortArray<DataInput<TDefinition, TType>> portArray
    UInt16 index
    TType data
    Type Parameters
    Name Description
    TType
    TDefinition
    Exceptions
    Type Condition
    IndexOutOfRangeException

    Thrown if the index is out of range with respect to the port array.

    SetPortArraySize(NodeHandle, InputPortID, UInt16)

    Set the size of an array of ports.

    Declaration
    public void SetPortArraySize(NodeHandle handle, InputPortID portArray, ushort size)
    Parameters
    Type Name Description
    NodeHandle handle

    Node on which to set the size of the array of ports

    InputPortID portArray

    Port array to be modified

    UInt16 size

    Desired array size

    Exceptions
    Type Condition
    InvalidOperationException

    Thrown if the given port is not a , or, if downsizing the array would invalidate existing connections

    SetPortArraySize<TDefinition, TType>(NodeHandle<TDefinition>, PortArray<DataInput<TDefinition, TType>>, UInt16)

    Set the size of an array of data ports.

    Declaration
    public void SetPortArraySize<TDefinition, TType>(NodeHandle<TDefinition> handle, PortArray<DataInput<TDefinition, TType>> portArray, ushort size)
        where TDefinition : INodeDefinition where TType : struct
    Parameters
    Type Name Description
    NodeHandle<TDefinition> handle

    Node on which to set the size of the array of ports

    PortArray<DataInput<TDefinition, TType>> portArray

    Data port array to be modified

    UInt16 size

    Desired array size

    Type Parameters
    Name Description
    TDefinition
    TType
    Exceptions
    Type Condition
    InvalidOperationException

    Thrown if downsizing the array would invalidate existing connections

    SetPortArraySize<TDefinition, TMsg>(NodeHandle<TDefinition>, PortArray<MessageInput<TDefinition, TMsg>>, UInt16)

    Set the size of an array of message ports.

    Declaration
    public void SetPortArraySize<TDefinition, TMsg>(NodeHandle<TDefinition> handle, PortArray<MessageInput<TDefinition, TMsg>> portArray, ushort size)
        where TDefinition : INodeDefinition, IMsgHandler<TMsg>
    Parameters
    Type Name Description
    NodeHandle<TDefinition> handle

    Node on which to set the size of the array of ports

    PortArray<MessageInput<TDefinition, TMsg>> portArray

    Message port array to be modified

    UInt16 size

    Desired array size

    Type Parameters
    Name Description
    TDefinition
    TMsg
    Exceptions
    Type Condition
    InvalidOperationException

    Thrown if downsizing the array would invalidate existing connections

    Update()

    Updates the node set in two phases:

    1. A message phase (simulation) where nodes are updated and messages are passed around
    2. Aligning the simulation world and the rendering world and initiate the rendering.
    RenderExecutionModel
    Declaration
    public void Update()
    Exceptions
    Type Condition
    InvalidOperationException

    Can be throw if invalid or missing dependencies were added through .

    ValueExists<T>(GraphValue<T>)

    Tests whether the supplied graph value exists.

    Declaration
    public bool ValueExists<T>(GraphValue<T> graphValue)
    Parameters
    Type Name Description
    GraphValue<T> graphValue
    Returns
    Type Description
    Boolean
    Type Parameters
    Name Description
    T
    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