UnityEditor.TreeViewDataSource.SetExpanded C# (CSharp) Method

SetExpanded() public method

public SetExpanded ( int id, bool expand ) : bool
id int
expand bool
return bool
        public virtual bool SetExpanded(int id, bool expand)
        {
            bool flag = this.IsExpanded(id);
            if (expand == flag)
            {
                return false;
            }
            if (expand)
            {
                this.expandedIDs.Add(id);
                this.expandedIDs.Sort();
            }
            else
            {
                this.expandedIDs.Remove(id);
            }
            this.m_NeedRefreshVisibleFolders = true;
            this.OnExpandedStateChanged();
            return true;
        }

Same methods

TreeViewDataSource::SetExpanded ( TreeViewItem item, bool expand ) : void