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

    Namespace Unity.DataFlowGraph

    Classes

    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, NodeSet.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 NodeSet 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.

    InvalidNodeDefinitionException

    KernelNodeDefinition<TKernelPortDefinition>

    Base class for a rendering-only node. 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.

    NodeDefinition<TSimulationPortDefinition>

    Helper class for defining a simulation-only node, with no simulation node data. NodeDefinition

    NodeDefinition<TNodeData, TSimulationPortDefinition>

    Helper class for defining a simulation-only node. NodeDefinition

    NodeDefinition<TKernelData, TKernelPortDefinition, TKernel>

    Helper class for defining a rendering-only node. NodeDefinition

    NodeDefinition<TNodeData, TKernelData, TKernelPortDefinition, TKernel>

    Helper class for defining a combined simulation / rendering node, without a simulation port definition. NodeDefinition

    NodeDefinition<TNodeData, TSimulationPortDefinition, TKernelData, TKernelPortDefinition, TKernel>

    Helper class for defining a combined simulation / rendering node. NodeDefinition

    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<TSimulationPortDefinition> Create<TDefinition>() Connect(NodeHandle, OutputPortID, NodeHandle, InputPortID, NodeSet.ConnectionType) Update(JobHandle)

    SimulationKernelNodeDefinition<TSimulationPortDefinition, TKernelPortDefinition>

    Base class for a combined simulation / rendering node. NodeDefinition

    SimulationNodeDefinition<TSimulationPortDefinition>

    Base class for a simulation-only node. NodeDefinition

    Structs

    Buffer<T>

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

    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.

    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.

    DestroyContext

    A destruction context provided to a node on destruction. Destroy(DestroyContext)

    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 ).

    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 ).

    GraphValue<T>

    A simple handle structure identifying a tap point in the graph.

    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. Init(InitContext)

    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 ).

    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 ).

    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>

    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.ResolvedPortArray<TDefinition, TType>

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

    UpdateContext

    A context provided to a node's OnUpdate(UpdateContext) implementation.

    Interfaces

    IDSLHandler

    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(JobHandle) is invoked. The functor is tied to a given node type by specifying it in the NodeDefinition<TNodeData, TSimulationPortDefinition, TKernelData, TKernelPortDefinition, TKernel>.

    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

    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 GetKernelData(NodeHandle)) 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 by NodeDefinition<TNodeData, TSimulationPortDefinition> or other variant 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.

    INodeData

    Interface tag to be implemented on a struct, that will contain the simulation-side contents of your node's instance data.

    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>

    Enums

    NodeSet.ConnectionType

    The kind of connection.

    NodeSet.RenderExecutionModel

    PortDescription.Category

    Describes the category of a port.

    In This Article
    • Classes
    • Structs
    • Interfaces
    • Enums
    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