public virtual EditorTreeNode add(int index, EditorTreeNode node) { this.childs.Insert(index, node); this.mapSnChilds.Add(node.sn, node); node.deep = this.deep + 1; node.parent = this; node.index = index; //如果是插入操作,更新后面兄弟节点的索引 for (int i = index + 1; i < this.childs.Count; ++i) { this.childs [i].index = i; } return(node); }
public virtual EditorTreeNode add(EditorTreeNode node) { int index = childs.Count; return(add(index, node)); }
public virtual bool canAttach(EditorTreeNode node) { return(true); }