docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class TreeListFlatten

    Lays a nested tree out as the flat row list a TreeListVirtual draws. A port of the web registry's flattenTree.

    Inheritance
    object
    TreeListFlatten
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.AppUI.UI
    Assembly: Unity.AppUI.dll
    Syntax
    public static class TreeListFlatten

    Methods

    Flatten<T>(TreeListFlattenOptions<T>)

    Walks a lazily loaded tree through its expansion state and lays it out as the flat, ordered row list a windowed tree renders.

    Declaration
    public static FlattenedTree<T> Flatten<T>(TreeListFlattenOptions<T> options)
    Parameters
    Type Name Description
    TreeListFlattenOptions<T> options

    How to read the tree.

    Returns
    Type Description
    FlattenedTree<T>

    The rows, the open levels and the levels still to load.

    Type Parameters
    Name Description
    T

    The caller's item type.

    Remarks

    An id is emitted at most once. A cache refreshed one level at a time can briefly hold an item under its old and its new parent after a move, or even a cycle, and a duplicate row would collide with its own id.

    Exceptions
    Type Condition
    ArgumentNullException

    A required option is missing.

    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)