UnityEditor.LazyTreeViewDataSource.SetExpandedWithChildren C# (CSharp) Method

SetExpandedWithChildren() public method

public SetExpandedWithChildren ( TreeViewItem item, bool expand ) : void
item TreeViewItem
expand bool
return 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>());
        }
    }