Struct NodeCollector
Utility class that collects nodes created for DFG
Namespace: Unity.Timeline.Animation
Syntax
public struct NodeCollector : IDisposable
Constructors
NodeCollector(NodeSet, Allocator)
Constructor, requiring a nodeset and an allocator
Declaration
public NodeCollector(NodeSet nodeSet, Allocator allocator)
Parameters
Type | Name | Description |
---|---|---|
Unity.DataFlowGraph.NodeSet | nodeSet | |
Allocator | allocator |
Properties
Item[Int32]
Access the node handle at the given index
Declaration
public NodeHandle this[int index] { get; }
Parameters
Type | Name | Description |
---|---|---|
Int32 | index |
Property Value
Type | Description |
---|---|
Unity.DataFlowGraph.NodeHandle |
NodeCount
The number of nodes currently collected
Declaration
public int NodeCount { get; }
Property Value
Type | Description |
---|---|
Int32 |
Set
The NodeSet to use to create nodes
Declaration
public NodeSet Set { get; }
Property Value
Type | Description |
---|---|
Unity.DataFlowGraph.NodeSet |
Methods
Create<TDefinition>()
Create a new node
Declaration
public NodeHandle<TDefinition> Create<TDefinition>()
where TDefinition : NodeDefinition, new()
Returns
Type | Description |
---|---|
Unity.DataFlowGraph.NodeHandle<TDefinition> |
Type Parameters
Name | Description |
---|---|
TDefinition |
CreateComponentNode(Entity)
Creates a new component node
Declaration
public NodeHandle<ComponentNode> CreateComponentNode(Entity entity)
Parameters
Type | Name | Description |
---|---|---|
Entity | entity |
Returns
Type | Description |
---|---|
Unity.DataFlowGraph.NodeHandle<Unity.DataFlowGraph.ComponentNode> |
Destroy(NodeHandle)
Releases an individual node
Declaration
public void Destroy(NodeHandle nodeHandle)
Parameters
Type | Name | Description |
---|---|---|
Unity.DataFlowGraph.NodeHandle | nodeHandle |
DetachNodes()
Removes all node handles from the collector without deallocation. Use this to transfer responsibility of the deallocating the nodes
Declaration
public void DetachNodes()
Dispose()
Release all nodes and associated memory
Declaration
public void Dispose()
ReleaseNodes()
Deallocates the the collected nodes
Declaration
public void ReleaseNodes()