Namespace Unity.DataFlowGraph
Classes
ComponentNode
A ComponentNode gives access to component data from a specific
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
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
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>.
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> of DataInput<TDefinition, TType>. (see Resolve<TNodeDefinition, TType>(ref DataOutput<TNodeDefinition, TType>)).
UpdateContext
A context provided to a node's OnUpdate(UpdateContext) implementation.
Interfaces
IDataInputPort
IDestroy
Interface for receiving destructor calls on INodeData, whenever a node is destroyed.
This supersedes
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() 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
IIndexablePort
Base interface for all port types that are allowed in
IInit
Interface for receiving constructor calls on INodeData, whenever a new node is created.
This supersedes Init(InitContext)
IInputPort
Base interface all input port types that are allowed in
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 Unity.DataFlowGraph.NodeDefinition`5.GetKernelData(Unity.DataFlowGraph.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 Unity.DataFlowGraph.NodeDefinition`2 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. 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 all output port types that are allowed in
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
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
NodeSet.RenderExecutionModel
NodeSetAPI.ConnectionType
The kind of connection.
PortDescription.Category
Describes the category of a port.