# AddChild(TreeViewItem)

> Helper method that adds the child TreeViewItem to the TreeViewItem.children list and sets the parent property on the child.

## Definition

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

```csharp
public void AddChild(TreeViewItem child)
```

### Parameters

**** (\[TreeViewItem]\(/engine/6000.0/script-reference/unityeditor/imgui/controls/treeviewitem)): TreeViewItem to be added to the children list.
