obsidian/笔记文件/2.笔记/SetupDepthsFromParentsAndChildren.md
2025-03-26 00:02:56 +08:00

19 lines
885 B
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#unity/日常积累
# [TreeView](https://docs.unity.cn/cn/2019.4/ScriptReference/IMGUI.Controls.TreeView.html).SetupDepthsFromParentsAndChildren
protected static void SetupDepthsFromParentsAndChildren ([IMGUI.Controls.TreeViewItem](https://docs.unity.cn/cn/2019.4/ScriptReference/IMGUI.Controls.TreeViewItem.html) root);
## 参数
root
后代应从中更新其深度的 TreeViewItem。
## 描述
使用输入 TreeViewItem 的深度为其所有后代 TreeViewItem 设置正确深度的 Utility 方法。
此方法可用于在设置 TreeViewItem 的子项属性后初始化 TreeViewItem 深度值。
另请参阅:[SetupDepthsFromParentsAndChildren](https://docs.unity.cn/cn/2019.4/ScriptReference/IMGUI.Controls.TreeView.SetupDepthsFromParentsAndChildren.html) 和 [BuildRoot](https://docs.unity.cn/cn/2019.4/ScriptReference/IMGUI.Controls.TreeView.BuildRoot.html)。