Struct NodeCollector | DOTS Timeline | 0.8.0-preview.1
docs.unity3d.com
    Show / Hide Table of Contents

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

    Methods

    Create<TDefinition>()

    Create a new node

    Declaration
    public NodeHandle<TDefinition> Create<TDefinition>()
        where TDefinition : NodeDefinition, new()
    Returns
    Type Description
    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
    NodeHandle<ComponentNode>

    Destroy(NodeHandle)

    Releases an individual node

    Declaration
    public void Destroy(NodeHandle nodeHandle)
    Parameters
    Type Name Description
    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()
    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