Version: 2019.4
LanguageEnglish
  • C#

TreeView.SetupParentsAndChildrenFromDepths

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

protected static void SetupParentsAndChildrenFromDepths(IMGUI.Controls.TreeViewItem root, IList<TreeViewItem> rows);

Parameters

root The hidden root item.
rows TreeViewItems where only the depth property have been set.

Description

Utility method for initializing all the parent and children properties of the rows using the order and the depths values that have been set.

Some tree data models are based on order and depth information only. This method can be called after creating all the rows to initalize the ‘parent’ and ‘children’ properties for each TreeViewItem in ‘rows’ based on the depth information for each item. This method assumes that the data presented in `rows` is in the order it should appear from top to bottom in the TreeView.

See Also: SetupDepthsFromParentsAndChildren, BuildRoot.

Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961