This version of Unity is unsupported.

TreeViewItem.depth

public int depth;

Description

The depth refers to how many ancestors this item has, and corresponds to the number of horizontal ‘indents’ this item has.