docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method DepthFirstSearch

    DepthFirstSearch(T, Action<T>)

    Performs a depth-first traversal starting at the given node.

    Declaration
    public void DepthFirstSearch(T startNode, Action<T> onVisit)
    Parameters
    Type Name Description
    T startNode

    The node to start from.

    Action<T> onVisit

    Callback invoked when a node is visited.

    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)