Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


TreeViewItem

The TreeViewItem is used to build the tree representation of a tree data structure.
Read time 1 minuteLast updated 12 days ago

Definition

Warning
Removed. TreeViewItem is now deprecated. You can likely now use TreeViewItem\<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 TreeViewItem\<InstanceID\> to get the proper typing.
public class TreeViewItem : TreeViewItem<int>, IComparable<TreeViewItem<int>>

Remarks

The TreeViewItem can be derived from to add custom data.
Additional Resources: TreeView.

Constructors

Constructor

Description

TreeViewItem()TreeViewItem constructor.
TreeViewItem(System.Int32)TreeViewItem constructor.
TreeViewItem(System.Int32,System.Int32)TreeViewItem constructor.
TreeViewItem(System.Int32,System.Int32,System.String)TreeViewItem constructor.

Properties

Property

Description

childrenThe list of child items of this TreeViewItem.
parentThe parent of this TreeViewItem. If it is null then it is considered the root of the TreeViewItem tree.

Methods

Method

Description

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

Inheritance