# TreeView<TIdentifier>

> The TreeView is an IMGUI control that lets you create tree views, list views and multi-column tables for Editor tools.

## Definition

* **Type:** Class
* **Namespace:** [UnityEditor.IMGUI.Controls](/engine/6000.5/script-reference/unityeditor/imgui/controls.md)
* **Assembly:** UnityEditor.CoreModule

```csharp
public abstract class TreeView<TIdentifier> where TIdentifier : unmanaged, IEquatable<TIdentifier>
```

## Remarks

It is customizable with regards to row content rendering, dragging logic, selection logic, searching, sorting and renaming of items. To ensure consistency between TreeViews the following features are not customizable: Foldout arrow rendering, selection rendering, drag markers rendering.

A good place to start is [TreeView\<TIdentifier>.BuildRoot()](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/buildroot.md).

## Constructors

| Constructor                                                                                                                                                                                                                           | Description                                                                                                               |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| [TreeView\`1(UnityEditor.IMGUI.Controls.TreeViewState\{\`0})](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/ctor.md#treeview\(treeviewstatet\))                                                                | The TreeView is always constructed with a state object and optionally a multi-column header object if a header is needed. |
| [TreeView\`1(UnityEditor.IMGUI.Controls.TreeViewState\{\`0},UnityEditor.IMGUI.Controls.MultiColumnHeader)](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/ctor.md#treeview\(treeviewstatet-multicolumnheader\)) | The TreeView is always constructed with a state object and optionally a multi-column header object if a header is needed. |

## Properties

| Property                                                                                                                               | Description                                                                                                                                                                                                                                                                                                           |
| -------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [baseIndent](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/baseindent.md)                                       | Indent used for all rows before the tree foldout arrows and content.                                                                                                                                                                                                                                                  |
| [cellMargin](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/cellmargin.md)                                       | When using a MultiColumnHeader this value adjusts the cell rects provided for all columns except the tree foldout column.                                                                                                                                                                                             |
| [columnIndexForTreeFoldouts](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/columnindexfortreefoldouts.md)       | When using a MultiColumnHeader this value should be set to the column index in which the foldout arrows should appear.                                                                                                                                                                                                |
| [customFoldoutYOffset](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/customfoldoutyoffset.md)                   | Custom vertical offset of the foldout arrow.                                                                                                                                                                                                                                                                          |
| [depthIndentWidth](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/depthindentwidth.md)                           | Value that returns how far the foldouts are indented for each increasing depth value.                                                                                                                                                                                                                                 |
| [enableItemHovering](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/enableitemhovering.md)                       | Set this property true if item hover effect is wanted. Default value is false.                                                                                                                                                                                                                                        |
| [extraSpaceBeforeIconAndLabel](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/extraspacebeforeiconandlabel.md)   | Value to control the spacing before the default icon and label. Can be used e.g for placing a toggle button to the left of the content.                                                                                                                                                                               |
| [foldoutOverride](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/foldoutoverride.md)                             | Register a callback to this property to override the Foldout button in the TreeView.                                                                                                                                                                                                                                  |
| [foldoutWidth](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/foldoutwidth.md)                                   | Width of the built-in foldout arrow.                                                                                                                                                                                                                                                                                  |
| [getNewSelectionOverride](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/getnewselectionoverride.md)             | Register a callback to this field to override how the TreeView handles selection changes in response to keys and mouse clicks.                                                                                                                                                                                        |
| [hasSearch](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/hassearch.md)                                         | The current search state of the TreeView.                                                                                                                                                                                                                                                                             |
| [hoveredItem](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/hovereditem.md)                                     | Use this property to detect which TreeViewItem the mouse cursor is currently hovering over in the TreeView. This property is only valid if the [TreeView\<TIdentifier>.enableItemHovering](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/enableitemhovering.md) property has been set to true. |
| [isDragging](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/isdragging.md)                                       | True if the user is currently dragging one or more items in the TreeView, and false otherwise.                                                                                                                                                                                                                        |
| [isInitialized](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/isinitialized.md)                                 | The TreeView is initialized by calling Reload(). Therefore returns false until Reload() is called the first time.                                                                                                                                                                                                     |
| [multiColumnHeader](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/multicolumnheader.md)                         | Get the MultiColumnHeader of the TreeView. Can be null if the TreeView was created without a MultiColumnHeader.                                                                                                                                                                                                       |
| [rootItem](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/rootitem.md)                                           | The hidden root item of the TreeView (it is never rendered).                                                                                                                                                                                                                                                          |
| [rowHeight](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/rowheight.md)                                         | The fixed height used for each row in the TreeView if GetCustomRowHeight have not been overridden.                                                                                                                                                                                                                    |
| [searchString](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/searchstring.md)                                   | Current search string of the TreeView.                                                                                                                                                                                                                                                                                |
| [showAlternatingRowBackgrounds](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/showalternatingrowbackgrounds.md) | Enable this to show alternating row background colors.                                                                                                                                                                                                                                                                |
| [showBorder](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/showborder.md)                                       | Enable this to show a border around the TreeView.                                                                                                                                                                                                                                                                     |
| [showingHorizontalScrollBar](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/showinghorizontalscrollbar.md)       | Returns true if the horizontal scroll bar is showing, otherwise false.                                                                                                                                                                                                                                                |
| [showingVerticalScrollBar](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/showingverticalscrollbar.md)           | Returns true if the vertical scroll bar is showing, otherwise false.                                                                                                                                                                                                                                                  |
| [state](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/state.md)                                                 | The state of the TreeView (expanded state, selection, scroll etc.)                                                                                                                                                                                                                                                    |
| [totalHeight](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/totalheight.md)                                     | Returns the sum of the TreeView row heights, the MultiColumnHeader height (if used) and the border (if used).                                                                                                                                                                                                         |
| [treeViewControlID](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/treeviewcontrolid.md)                         | The controlID used by the TreeView to obtain keyboard control focus.                                                                                                                                                                                                                                                  |
| [treeViewRect](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/treeviewrect.md)                                   | The Rect the TreeView is being rendered to.                                                                                                                                                                                                                                                                           |
| [useScrollView](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/usescrollview.md)                                 | When drawing the TreeView contents, will it be enclosed within a ScrollView?                                                                                                                                                                                                                                          |

## Methods

| Method                                                                                                                                     | Description                                                                                                                                                                                                                                                  |
| ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [AddExpandedRows](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/addexpandedrows.md)                                 | Adds the expanded rows of the full tree to the input list. Only use this method if a full tree was built in BuildRoot.                                                                                                                                       |
| [AfterRowsGUI](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/afterrowsgui.md)                                       | This is called after all rows have their [TreeView\<TIdentifier>.RowGUI](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/rowgui.md) called.                                                                                             |
| [BeforeRowsGUI](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/beforerowsgui.md)                                     | This is called before any rows have their [TreeView\<TIdentifier>.RowGUI](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/rowgui.md) called.                                                                                            |
| [BeginRename](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/beginrename.md)                                         | Shows the rename overlay for a TreeViewItem.                                                                                                                                                                                                                 |
| [BuildRoot](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/buildroot.md)                                             | Abstract method that is required to be implemented. By default this method should create the full tree of TreeViewItems and return the root.                                                                                                                 |
| [BuildRows](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/buildrows.md)                                             | Override this method to take control of how the rows are generated.                                                                                                                                                                                          |
| [CanBeParent](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/canbeparent.md)                                         | Override this method to control which items are allowed to be parents.                                                                                                                                                                                       |
| [CanChangeExpandedState](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/canchangeexpandedstate.md)                   | Override this method to control whether an item can be expanded or collapsed by key or mouse.                                                                                                                                                                |
| [CanMultiSelect](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/canmultiselect.md)                                   | Override this method to control whether the item can be part of a multiselection.                                                                                                                                                                            |
| [CanRename](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/canrename.md)                                             | Override this method to control whether the item can be renamed using a keyboard shortcut or when clicking an already selected item.                                                                                                                         |
| [CanStartDrag](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/canstartdrag.md)                                       | This function is called whenever a TreeViewItem is clicked and dragged. It returns false by default.                                                                                                                                                         |
| [CenterRectUsingSingleLineHeight](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/centerrectusingsinglelineheight.md) | Modifies the input rect so it is centered and have a height equal to [EditorGUIUtility.singleLineHeight](/engine/6000.5/script-reference/unityeditor/editorguiutility/singlelineheight.md).                                                                  |
| [CollapseAll](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/collapseall.md)                                         | Collapse all expanded items in the TreeView.                                                                                                                                                                                                                 |
| [CommandEventHandling](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/commandeventhandling.md)                       | This function is called automatically and handles the ExecuteCommand events for “SelectAll” and “FrameSelection”. Override this function to extend or avoid Command events.                                                                                  |
| [ContextClicked](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/contextclicked.md)                                   | Override this method to handle context clicks outside any items (but still in the TreeView rect).                                                                                                                                                            |
| [ContextClickedItem](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/contextclickeditem.md)                           | Override this method to handle a context click on an item with ID [TreeViewItem\<TIdentifier>.id](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeviewitem1/id.md).                                                                           |
| [DoesItemMatchSearch](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/doesitemmatchsearch.md)                         | Override this function to extend or change the search behavior.                                                                                                                                                                                              |
| [DoubleClickedItem](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/doubleclickeditem.md)                             | Override this method to handle double click events on an item.                                                                                                                                                                                               |
| [EndRename](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/endrename.md)                                             | Ends renaming if the rename overlay is shown. If called while the rename overlay is not being shown, this method does nothing.                                                                                                                               |
| [ExpandAll](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/expandall.md)                                             | Expand all collapsed items in the TreeView.                                                                                                                                                                                                                  |
| [ExpandedStateChanged](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/expandedstatechanged.md)                       | Override to get notified when items are expanded or collapsed. This is a general notification that the expanded state has changed.                                                                                                                           |
| [FindItem](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/finditem.md)                                               | Finds a TreeViewItem by an ID.                                                                                                                                                                                                                               |
| [FindRowOfItem](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/findrowofitem.md)                                     | Returns the row of the given TreeViewItem.                                                                                                                                                                                                                   |
| [FindRows](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/findrows.md)                                               | Useful for converting from TreeViewItem IDs to TreeViewItems using the current rows.                                                                                                                                                                         |
| [FrameItem](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/frameitem.md)                                             | This will reveal the item with ID id (by expanding the ancestors of that item) and will make sure it is visible in the ScrollView.                                                                                                                           |
| [GetAncestors](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/getancestors.md)                                       | This method is e.g. used for revealing items that are currently under a collapsed item.                                                                                                                                                                      |
| [GetCellRectForTreeFoldouts](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/getcellrectfortreefoldouts.md)           | Utility for multi column setups. This method will clip the input rowRect against the column rect defined by columnIndexForTreeFoldouts to get the cell rect where the the foldout arrows appear.                                                             |
| [GetContentIndent](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/getcontentindent.md)                               | Returns the horizontal content offset for an item. This is where the content should begin (after the foldout arrow).                                                                                                                                         |
| [GetCustomRowHeight](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/getcustomrowheight.md)                           | Override to control individual row heights.                                                                                                                                                                                                                  |
| [GetDescendantsThatHaveChildren](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/getdescendantsthathavechildren.md)   | Returns all descendants for the item with ID id that have children.                                                                                                                                                                                          |
| [GetExpanded](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/getexpanded.md)                                         | Returns a list of TreeViewItem IDs that are currently expanded in the TreeView.                                                                                                                                                                              |
| [GetFirstAndLastVisibleRows](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/getfirstandlastvisiblerows.md)           | Returns the first and the last indices of the rows that are visible in the scroll view of the TreeView.                                                                                                                                                      |
| [GetFoldoutIndent](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/getfoldoutindent.md)                               | Returns the horizontal foldout offset for an item. This is where the foldout arrow is rendered.                                                                                                                                                              |
| [GetRenameRect](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/getrenamerect.md)                                     | Override this method if custom GUI handling are used in [TreeView\<TIdentifier>.RowGUI](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/rowgui.md). This method for controls where the rename overlay appears.                          |
| [GetRowRect](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/getrowrect.md)                                           | Get the rect for a row.                                                                                                                                                                                                                                      |
| [GetRows](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/getrows.md)                                                 | This is the list of TreeViewItems that have been built in [TreeView\<TIdentifier>.BuildRows](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/buildrows.md).                                                                             |
| [GetSelection](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/getselection.md)                                       | Returns the list of TreeViewItem IDs that are currently selected.                                                                                                                                                                                            |
| [HandleDragAndDrop](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/handledraganddrop.md)                             | Override this function to control the drag and drop behavior of the TreeView.                                                                                                                                                                                |
| [HasFocus](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/hasfocus.md)                                               | Returns true if the TreeView and its EditorWindow have keyboard focus.                                                                                                                                                                                       |
| [HasSelection](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/hasselection.md)                                       | Returns true if the TreeView has a selection.                                                                                                                                                                                                                |
| [IsExpanded](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/isexpanded.md)                                           | Returns true if the TreeViewItem with ID id is currently expanded.                                                                                                                                                                                           |
| [IsSelected](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/isselected.md)                                           | Returns true if the TreeViewItem with ID id is currently selected.                                                                                                                                                                                           |
| [KeyEvent](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/keyevent.md)                                               | Override this method to handle events when the TreeView has keyboard focus.                                                                                                                                                                                  |
| [OnGUI](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/ongui.md)                                                     | This is the main GUI method of the TreeView, where the TreeViewItems are processed and drawn.                                                                                                                                                                |
| [RefreshCustomRowHeights](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/refreshcustomrowheights.md)                 | Refreshes the cache of custom row rects based on the heights returned by [TreeView\<TIdentifier>.GetCustomRowHeight](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/getcustomrowheight.md).                                            |
| [Reload](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/reload.md)                                                   | Call this to force the TreeView to reload its data. This in turn causes BuildRoot and BuildRows to be called.                                                                                                                                                |
| [RenameEnded](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/renameended.md)                                         | Called when rename ends either by the user completing the renaming process, when the rename overlay loses focus or is closed using  [TreeView\<TIdentifier>.EndRename()](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/endrename.md). |
| [Repaint](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/repaint.md)                                                 | Request a repaint of the window that the TreeView is rendered in.                                                                                                                                                                                            |
| [RowGUI](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/rowgui.md)                                                   | Override this method to add custom GUI content for the rows in the TreeView.                                                                                                                                                                                 |
| [SearchChanged](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/searchchanged.md)                                     | Override the method to get notified of search string changes.                                                                                                                                                                                                |
| [SelectAllRows](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/selectallrows.md)                                     | Selects all rows in the TreeView.                                                                                                                                                                                                                            |
| [SelectionChanged](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/selectionchanged.md)                               | Override the method to get notified of selection changes.                                                                                                                                                                                                    |
| [SelectionClick](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/selectionclick.md)                                   | Use this method in [TreeView\<TIdentifier>.RowGUI](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/rowgui.md) to peform the logic of a mouse click.                                                                                     |
| [SetExpanded](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/setexpanded.md)                                         | Set a single TreeViewItem to be expanded or collapsed.                                                                                                                                                                                                       |
| [SetExpandedRecursive](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/setexpandedrecursive.md)                       | Expand or collapse all items under item with id.                                                                                                                                                                                                             |
| [SetFocus](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/setfocus.md)                                               | Calling this function changes the keyboard focus to the TreeView.                                                                                                                                                                                            |
| [SetFocusAndEnsureSelectedItem](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/setfocusandensureselecteditem.md)     | Calling this function changes the keyboard focus to the TreeView and ensures an item is selected. Use this function to enable key navigation of the TreeView.                                                                                                |
| [SetSelection](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/setselection.md)                                       | Set the selected items of the TreeView.                                                                                                                                                                                                                      |
| [SetupDragAndDrop](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/setupdraganddrop.md)                               | This function is called when [TreeView\<TIdentifier>.CanStartDrag](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/canstartdrag.md) returns true.                                                                                       |
| [SingleClickedItem](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/singleclickeditem.md)                             | Override this method to handle single click events on an item.                                                                                                                                                                                               |
| [SortItemIDsInRowOrder](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/sortitemidsinroworder.md)                     | Returns a list sorted in the order in which they are shown in the TreeView.                                                                                                                                                                                  |

## Static Methods

| Method                                                                                                                                         | Description                                                                                                                                                                                                                                                            |
| ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [CreateChildListForCollapsedParent](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/createchildlistforcollapsedparent.md) | Creates a dummy TreeViewItem list. Useful when overriding [TreeView\<TIdentifier>.BuildRows](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/buildrows.md) to prevent building a full tree of items.                                              |
| [IsChildListForACollapsedParent](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/ischildlistforacollapsedparent.md)       | Utility method for checking if the `childList` is identical to the one returned by the [TreeView\<TIdentifier>.CreateChildListForCollapsedParent()](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/createchildlistforcollapsedparent.md) method. |
| [SetupDepthsFromParentsAndChildren](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/setupdepthsfromparentsandchildren.md) | Utility method using the depth of the input TreeViewItem to set the correct depths for all its descendant TreeViewItems.                                                                                                                                               |
| [SetupParentsAndChildrenFromDepths](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/setupparentsandchildrenfromdepths.md) | Utility method for initializing all the parent and children properties of the rows using the order and the depths values that have been set.                                                                                                                           |

## Classes

| Class                                                                                                                         | Description                                                |
| ----------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------- |
| [TreeView\<TIdentifier>.DefaultGUI](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/defaultgui.md)       | Default GUI methods and properties for the TreeView class. |
| [TreeView\<TIdentifier>.DefaultStyles](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/defaultstyles.md) | Default styles used by the TreeView class.                 |

## Structs

| Struct                                                                                                                                      | Description                                                                                                                                                                    |
| ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [TreeView\<TIdentifier>.CanStartDragArgs](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/canstartdragargs.md)         | Method arguments for the [TreeView\<TIdentifier>.CanStartDrag](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/canstartdrag.md) virtual method.           |
| [TreeView\<TIdentifier>.DragAndDropArgs](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/draganddropargs.md)           | Method arguments for the [TreeView\<TIdentifier>.HandleDragAndDrop](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/handledraganddrop.md) virtual method. |
| [TreeView\<TIdentifier>.RenameEndedArgs](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/renameendedargs.md)           | Method arguments for the virtual method [TreeView\<TIdentifier>.RenameEnded](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/renameended.md).             |
| [TreeView\<TIdentifier>.RowGUIArgs](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/rowguiargs.md)                     | Method arguments for the virtual method [TreeView\<TIdentifier>.RowGUI](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/rowgui.md).                       |
| [TreeView\<TIdentifier>.SetupDragAndDropArgs](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/setupdraganddropargs.md) | Method arguments to the virtual method SetupDragAndDrop.                                                                                                                       |

## Enums

| Enum                                                                                                                                      | Description                                                                                                                    |
| ----------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| [TreeView\<TIdentifier>.DragAndDropPosition](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/draganddropposition.md) | Enum describing the possible positions a drag can have relative to the items: upon a item, between two items or outside items. |

## Delegates

| Delegate                                                                                                                                          | Description                                                                                                                                                                                      |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [TreeView\<TIdentifier>.DoFoldoutCallback](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/dofoldoutcallback.md)             | Callback signature used to override the TreeView foldout. See [TreeView\<TIdentifier>.foldoutOverride](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/foldoutoverride.md). |
| [TreeView\<TIdentifier>.GetNewSelectionFunction](/engine/6000.5/script-reference/unityeditor/imgui/controls/treeview1/getnewselectionfunction.md) | A callback which determines how TreeView handles selection changes in response to keys and mouse clicks.                                                                                         |
