public static GetUniqueNodeID ( |
||
group | ||
Résultat | int |
public override void FetchData() { if ((Object)this.m_Controller == (Object)null) { this.m_RootItem = (TreeViewItem)null; } else if ((Object)this.m_Controller.masterGroup == (Object)null) { Debug.LogError((object)"The Master group is missing !!!"); this.m_RootItem = (TreeViewItem)null; } else { this.m_RootItem = (TreeViewItem) new AudioMixerTreeViewNode(AudioGroupDataSource.GetUniqueNodeID(this.m_Controller.masterGroup), 0, (TreeViewItem)null, this.m_Controller.masterGroup.name, this.m_Controller.masterGroup); this.AddNodesRecursively(this.m_Controller.masterGroup, this.m_RootItem, 1); this.m_NeedRefreshVisibleFolders = true; } }
private void AddNodesRecursively(AudioMixerGroupController group, TreeViewItem parent, int depth) { List <TreeViewItem> treeViewItemList = new List <TreeViewItem>(); for (int index = 0; index < group.children.Length; ++index) { AudioMixerTreeViewNode mixerTreeViewNode = new AudioMixerTreeViewNode(AudioGroupDataSource.GetUniqueNodeID(group.children[index]), depth, parent, group.children[index].name, group.children[index]); mixerTreeViewNode.parent = parent; treeViewItemList.Add((TreeViewItem)mixerTreeViewNode); this.AddNodesRecursively(group.children[index], (TreeViewItem)mixerTreeViewNode, depth + 1); } parent.children = treeViewItemList; }