# TreeView

> The TreeView is always constructed with a state object and optionally a multi-column header object if a header is needed.

## Definition

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

## TreeView(TreeViewState)

The TreeView is always constructed with a state object and optionally a multi-column header object if a header is needed.

> **Warning:**
>
> **Deprecated.** TreeView is now deprecated. You can likely now use TreeView\\\<int\\> instead and not think more about it. But if you were using that identifier to store InstanceID data, you should instead opt to upgrade your TreeViews to use TreeView\\\<InstanceID\\> to get the proper typing.

```csharp
protected TreeView(TreeViewState state)
```

### Parameters

**** (\[TreeViewState]\(/engine/6000.3/script-reference/unityeditor/imgui/controls/treeviewstate)): TreeView state (expanded items, selection etc.)

### Remarks

Additional Resources: [TreeViewState](/engine/6000.3/script-reference/unityeditor/imgui/controls/treeviewstate.md), [MultiColumnHeader](/engine/6000.3/script-reference/unityeditor/imgui/controls/multicolumnheader.md).

## TreeView(TreeViewState, MultiColumnHeader)

The TreeView is always constructed with a state object and optionally a multi-column header object if a header is needed.

> **Warning:**
>
> **Deprecated.** TreeView is now deprecated. You can likely now use TreeView\\\<int\\> instead and not think more about it. But if you were using that identifier to store InstanceID data, you should instead opt to upgrade your TreeViews to use TreeView\\\<InstanceID\\> to get the proper typing.

```csharp
protected TreeView(TreeViewState state, MultiColumnHeader multiColumnHeader)
```

### Parameters

**** (\[TreeViewState]\(/engine/6000.3/script-reference/unityeditor/imgui/controls/treeviewstate)): TreeView state (expanded items, selection etc.)**** (\[MultiColumnHeader]\(/engine/6000.3/script-reference/unityeditor/imgui/controls/multicolumnheader)): Multi-column header for the TreeView.

### Remarks

Additional Resources: [TreeViewState](/engine/6000.3/script-reference/unityeditor/imgui/controls/treeviewstate.md), [MultiColumnHeader](/engine/6000.3/script-reference/unityeditor/imgui/controls/multicolumnheader.md).
