UnityEditor.LazyTreeViewDataSource.SetExpandedWithChildren C# (CSharp) Méthode

SetExpandedWithChildren() public méthode

public SetExpandedWithChildren ( TreeViewItem item, bool expand ) : void
item TreeViewItem
expand bool
Résultat void
        public override void SetExpandedWithChildren(TreeViewItem item, bool expand)
        {
            HashSet<int> source = new HashSet<int>(base.expandedIDs);
            HashSet<int> parentsBelow = this.GetParentsBelow(item.id);
            if (expand)
            {
                source.UnionWith(parentsBelow);
            }
            else
            {
                source.ExceptWith(parentsBelow);
            }
            this.SetExpandedIDs(source.ToArray<int>());
        }
    }