Namespace Unity.DataFlowGraph | Data Flow Graph | 0.19.0-preview.7
docs.unity3d.com
    Show / Hide Table of Contents

    Namespace Unity.DataFlowGraph

    Classes

    CausesSideEffectsAttribute

    Use this attribute on a IGraphKernel<TKernelData, TKernelPortDefinition> implementation to express that it has to be executed since it could cause invisible side effects. NodeSet.RenderOptimizations

    CommonContextAPI

    ComponentNode

    A ComponentNode gives access to component data from a specific Entity in the rendering graph. IComponentData and IBufferElementData components are modeled as DataInput<TDefinition, TType> or DataOutput<TDefinition, TType>, and DataInput<TDefinition, TType> or DataOutput<TDefinition, TType> respectively.

    Using Input<TType>(IsComponent<TType>) and Output<TType>(IsComponent<TType>) you can create ports that can be connected to normal nodes, and the data will be readable and writable as usual in the rendering graph. Connect(NodeHandle, OutputPortID, NodeHandle, InputPortID, NodeSetAPI.ConnectionType).

    The data will be committed after the returned from Update(JobHandle) is completed.

    ComponentNodes behave as normal nodes and thus any normal API on the NodeSetAPI is accessible to them, with the exception that a ComponentNode does not have any ports predefined. GetPortDescription(NodeHandle)

    ComponentNodes have to be created through CreateComponentNode(Entity), and cannot be instantiated through Create<TDefinition>().

    A ComponentNode doesn't do anything itself and cannot be extended - it merely offers a topological dynamic read/write interface through ports to ECS.

    DSLHandler<TDSLInterface>

    Connection handler for DSLInput<TNodeDefinition, TDSLDefinition, IDSL> and DSLOutput<TNodeDefinition, TDSLDefinition, IDSL> port types. The implementation is invoked whenever connections on DSL ports tied to this handler are made or broken.

    InputPortArrayExt

    Extension methods added to PortArray<TPort> which are specific to PortArrays of input port types

    InvalidNodeDefinitionException

    KernelNodeDefinition<TKernelPortDefinition>

    Base class for a rendering-only node. The presence of IKernelData and IGraphKernel structs as nested types in derived classes is mandatory and will automatically be discovered and used to hold rendering-side node data and declare the rendering function. NodeDefinition

    ManagedAttribute

    Use this to tag your INodeData as being managed, meaning it will be possible to store non-blittable data on the type (like references).

    NodeDefinition

    Base class for all node definition declarations. Provides helper functionality and base implementations around NodeDefinition.

    A NodeDefinition instance exists per existing NodeSet.

    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. Unity.DataFlowGraph.NodeDefinition`1 Update()

    NodeSetAPI

    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. Unity.DataFlowGraph.NodeDefinition`1 Create<TDefinition>() Connect(NodeHandle, OutputPortID, NodeHandle, InputPortID, NodeSetAPI.ConnectionType) Unity.DataFlowGraph.NodeSetAPI.Update(Unity.Jobs.JobHandle,Unity.DataFlowGraph.NodeSetAPI.ComponentSystemDispatch)

    NodeSetAPI_Deprecated_Ext

    OutputPortArrayExt

    Extension methods added to PortArray<TPort> which are specific to PortArrays of output port types

    SimulationKernelNodeDefinition<TSimulationPortDefinition, TKernelPortDefinition>

    Base class for a combined simulation / rendering node. The presence of IKernelData and IGraphKernel structs as nested types in derived classes is mandatory and will automatically be discovered and used to hold rendering-side node data and declare the rendering function. The presence of an INodeData struct as a nested type in derived classes will automatically be discovered and used to hold simulation-side node data and declare the simulation handlers for the node. NodeDefinition

    SimulationNodeDefinition<TSimulationPortDefinition>

    Base class for a simulation-only node. The presence of an INodeData struct as a nested type in derived classes will automatically be discovered and used to hold simulation-side node data and declare the simulation handlers for the node. NodeDefinition

    Structs

    Buffer<T>

    An array data type to be used inside of a DataInput<TDefinition, TType> or DataOutput<TDefinition, TType>.

    CommonContext

    The common portion of the API which appears on all contexts. Instances of InitContext, MessageContext, and UpdateContext can all be implicitly cast to this common context.

    DataInput<TDefinition, TType>

    Declaration of a specific data input connection port for a given node type.

    These are used as fields within an IKernelPortDefinition struct implementation (see ).

    Connections and data appearing on these types of ports is only available in the node's implementation of Execute(RenderContext, TKernelData, ref TKernelPortDefinition) and accessible via the given RenderContext instance.

    DataInputEndpoint<TType>

    A directed, strongly-typed data input endpoint. See for more information. You can use this in various topology APIs, like Connect<TLeft, TRight>(TLeft, TRight).

    DataOutputEndpoint<TType> Tie<TType>(DataInput<TDefinition, TType>)

    DataOutput<TDefinition, TType>

    Declaration of a specific data output connection port for a given node type.

    These are used as fields within an IKernelPortDefinition struct implementation (see ).

    Data from these ports can only be produced in the node's implementation of Execute(RenderContext, TKernelData, ref TKernelPortDefinition) by filling out the instance accessible via the given RenderContext.

    DataOutputEndpoint<TType>

    A directed, strongly-typed data output endpoint. See for more information. You can use this in various topology APIs, like Connect<TLeft, TRight>(TLeft, TRight).

    DataInputEndpoint<TType> Tie<TType>(DataOutput<TDefinition, TType>)

    DestroyContext

    A destruction context provided to a node on destruction.

    DSLHandler<TDSLInterface>.ConnectionInfo

    DSLInput<TNodeDefinition, TDSLDefinition, IDSL>

    Declaration of a specific DSL input connection port for a given node type.

    These are used as fields within an ISimulationPortDefinition struct implementation (see ).

    DSLInputEndpoint<TDSLHandler>

    A directed, strongly-typed domain specific input endpoint. See for more information. You can use this in various topology APIs, like Connect<TLeft, TRight>(TLeft, TRight).

    DSLOutputEndpoint<TDSLHandler> Tie<TCompleteDefinition, TDSLDefinition, IDSL>(DSLInput<TCompleteDefinition, TDSLDefinition, IDSL>)

    DSLOutput<TNodeDefinition, TDSLDefinition, IDSL>

    Declaration of a specific DSL output connection port for a given node type.

    These are used as fields within an ISimulationPortDefinition struct implementation (see ).

    DSLOutputEndpoint<TDSLHandler>

    A directed, strongly-typed domain specific output endpoint. See for more information. You can use this in various topology APIs, like Connect<TLeft, TRight>(TLeft, TRight).

    DSLOutputEndpoint<TDSLHandler> Tie<TCompleteDefinition, TDSLDefinition, IDSL>(DSLOutput<TCompleteDefinition, TDSLDefinition, IDSL>)

    GraphValue<T>

    A simple handle structure identifying a tap point in the graph. CreateGraphValue<T, TDefinition>(NodeHandle<TDefinition>, DataOutput<TDefinition, T>)

    GraphValueArray<T>

    GraphValueResolver

    A graph value resolver can resolve the state of an output port pointed to by a GraphValue<T>. It can be burst compiled, used concurrently on a job or on the main thread, so long as the dependencies are resolved.

    API on this object is a subset of what is available on RenderContext

    InitContext

    A unique initialization context provided to a node on instantiation that allows it to internally configure its specific instance. Allows forwarding port declarations to another node instance on a port of the same type. The effect is that any external connection made to those forwarded ports are converted into a direct connection between the 3rd party and the the node forwarded to. This is invisible to anyone external to the node, and handled transparently by the node set. This system allows a node to create sub graphs that appear as single node to everyone else.

    InputEndpoint

    A directed, weak (runtime checked) input endpoint. See for more information. You can use this in various topology APIs, like Connect<TLeft, TRight>(TLeft, TRight).

    OutputEndpoint

    InputPortID

    Weakly typed identifier for a given input port of a node.

    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.

    MessageInput<TDefinition, TMsg>

    Declaration of a specific message input connection port for a given node type.

    These are used as fields within an ISimulationPortDefinition struct implementation (see ).

    MessageInputEndpoint<TType>

    A directed, strongly-typed message input endpoint. See for more information. You can use this in various topology APIs, like Connect<TLeft, TRight>(TLeft, TRight).

    MessageOutputEndpoint<TType> Tie<TType>(MessageInput<TDefinition, TType>)

    MessageOutput<TDefinition, TMsg>

    Declaration of a specific message output connection port for a given node type.

    These are used as fields within an ISimulationPortDefinition struct implementation (see ).

    MessageOutputEndpoint<TType>

    A directed, strongly-typed message output endpoint. See for more information. You can use this in various topology APIs, like Connect<TLeft, TRight>(TLeft, TRight).

    MessageInputEndpoint<TType> Tie<TType>(MessageOutput<TDefinition, TType>)

    NodeAdapter

    NodeAdapter<TDefinition>

    NodeHandle

    An untyped handle to any type of node instance. A handle can be thought of as a reference or an ID to an instance, and you can use with the various APIs in NodeSet to interact with the node.

    A valid handle is guaranteed to not be equal to a default initialized node handle. After a handle is destroyed, any handle with this value will be invalid.

    Use Exists(NodeHandle) to test whether the handle (still) refers to a valid instance. Create<TDefinition>() Destroy(NodeHandle)

    NodeHandle<TDefinition>

    A strongly typed version of a NodeHandle.

    A strongly typed version can automatically decay to an untyped NodeHandle, but the other way around requires a cast.

    Strongly typed handles are pre-verified and subsequently can be a lot more efficient in usage, as no type checks need to be performed internally.

    CastHandle<TDefinition>(NodeHandle)

    NodeInterfaceLink<TInterface>

    NodeInterfaceLink<TInterface, TDefinition>

    OutputEndpoint

    A directed, weak (runtime checked) output endpoint. See for more information. You can use this in various topology APIs, like Connect<TLeft, TRight>(TLeft, TRight).

    InputEndpoint

    OutputPortID

    Weakly typed identifier for a given output port of a node.

    PortArray<TPort>

    PortDescription

    Runtime type information about node ports as returned by GetPortDescription(NodeHandle).

    PortDescription.InputPort

    Describes an input port on a node. An PortDescription.InputPort can automatically decay to- and be used as a weakly typed InputPortID.

    PortDescription.OutputPort

    RenderContext

    Helper which is strictly only available inside a node's Execute(RenderContext, TKernelData, ref TKernelPortDefinition) implementation allowing it to resolve its data ports to actual instance data.

    RenderContext.ResolvedInputPortArray<TDefinition, TType>

    A resolved PortArray<TPort> of DataInput<TDefinition, TType>. (see Resolve<TNodeDefinition, TType>(ref DataOutput<TNodeDefinition, TType>)).

    SimulationTestContext<TNodeData>

    A unique node testing context provided to test functions (SimulationTestFunctionWithContext<TNodeData>) that are injected into simulation via SendTest<TNodeData>(NodeHandle, SimulationTestFunctionWithContext<TNodeData>). Allows recovery of the tested node's simulation data in order for the function to make assertions about its contents and throw exceptions (such as those from an ).

    TypeHash

    UpdateContext

    A context provided to a node's implementation.

    Interfaces

    IDataInputPort

    Base interface for all data input port types.

    IDataOutputPort

    Base interface for all data output port types.

    IDestroy

    Interface for receiving destructor calls on INodeData, whenever a node is destroyed.

    This supersedes

    IDSLHandler

    IEndpoint

    An endpoint represents a directed port (like DataInput<TDefinition, TType> and a node handle, like NodeHandle<TDefinition>.

    Together they form a generalized "connectable" point that can be used in various unary and binary topology APIs.

    You can create them for instance by tying a known handle to a port, using Tie<TType>(DataInput<TDefinition, TType>).

    IGraphKernel

    IGraphKernel<TKernelData, TKernelPortDefinition>

    Interface to be implemented on a struct which represents the functor responsible for processing a node's DataInput<TDefinition, TType>s and filling out its DataOutput<TDefinition, TType>s each time Update() is invoked. The functor is tied to a given node type by specifying it in the Unity.DataFlowGraph.NodeDefinition`5.

    Any fields which exist in the struct are preserved between invocations of Execute(RenderContext, TKernelData, ref TKernelPortDefinition) and represent the ongoing state of the node's kernel.

    Implementing structs may be tagged with the BurstCompileAttribute to take advantage of improved performance.

    IIndexablePort

    Base interface for all port types that are allowed in s.

    IInit

    Interface for receiving constructor calls on INodeData, whenever a new node is created.

    This supersedes

    IInputPort

    Base interface for all input port types that are allowed in s.

    IKernelData

    Interface tag to be implemented on a struct, that will contain instance data on your node that is read/write accessible on the simulation-side (see ) and made available read-only in the node's kernel on the rendering-side (see Execute(RenderContext, TKernelData, ref TKernelPortDefinition)).

    IKernelPortDefinition

    Interface tag to be implemented on a struct, that will contain the the node definition's kernel port declarations. DataInput<TDefinition, TType> DataOutput<TDefinition, TType>

    IMsgHandler<TMsg>

    Interface to be implemented on an INodeData struct for a SimulationNodeDefinition<TSimulationPortDefinition> or SimulationKernelNodeDefinition<TSimulationPortDefinition, TKernelPortDefinition> which includes an ISimulationPortDefinition that contains MessageInput<TDefinition, TMsg> fields. This interface is used to handle messages which arrive on those MessageInput<TDefinition, TMsg> ports.

    IMsgHandlerGeneric<TMsg>

    Alternate variant which can be used in place of IMsgHandler<TMsg> when an INodeData struct implementation would otherwise need to implement two incompatible IMsgHandler<TMsg> interfaces. A common use of this variant would be for a node which has an input of generic type and other input(s) of non generic type(s). In this scenario, the node could use IMsgHandlerGeneric<TMsg> to implement the handler for its generic input, and normal IMsgHandler<TMsg>s for other inputs.

    INodeData

    Interface tag to be implemented on a struct, that will contain the simulation-side contents of your node's instance data. The same struct should also carry any of the desired IInit, IDestroy, IUpdate and/or IMsgHandler<TMsg> implementations that the node would like handlers for.

    IOutputPort

    Base interface for all output port types that are allowed in s.

    ISimulationPortDefinition

    Interface tag to be implemented on a struct, that will contain the the node definition's simulation port declarations. MessageInput<TDefinition, TMsg> MessageOutput<TDefinition, TMsg> DSLInput<TNodeDefinition, TDSLDefinition, IDSL> DSLOutput<TNodeDefinition, TDSLDefinition, IDSL>

    ITaskPort<TTask>

    ITaskPortMsgHandler<TTask, TMessage>

    IUpdate

    Interface for receiving update calls on INodeData, issued once for every call to Update() if the implementing node in question has registered itself for updating

    • , or .

    Note that there is NO implicit nor explicit ordering between nodes' Update(UpdateContext), in addition it is not stable either.

    If you need updates to occur in topological order (trickled downstream) in simulation, you should emit a message downstream that other nodes react to through connections.

    This supersedes

    Enums

    BufferUploadMethod

    NodeSet.RenderExecutionModel

    NodeSet.RenderOptimizations

    Selective flags to control what optimizations are applied to the rendering graph, that is, where IGraphKernel<TKernelData, TKernelPortDefinition>s run.

    It is situational whether any (combination of) optimization flags provide a net performance benefit. Be sure to profile.

    NodeSetAPI.ConnectionType

    The kind of connection.

    PortDescription.Category

    Describes the category of a port.

    Delegates

    SimulationTestFunction<TNodeData>

    A function used for testing the internal simulation data of a node.

    SimulationTestFunctionWithContext<TNodeData>

    A function used for testing the internal simulation data of a node with an associated context allowing further testing of child nodes.

    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