/// <summary> /// 添加子节点 /// </summary> /// <param UIName="child"></param> internal void AddChildNode(IBaseUIForm child) { if (!childrenNodeID.Contains(child.ID)) { //todo 对象池获取 UIFormNode node = new UIFormNode(); node.Init(child); childrenNode.Add(node.ID, node); childrenNodeID.Add(node.ID); } else { if (!childrenNode.ContainsKey(child.ID)) { UIFormNode node = new UIFormNode(); node.Init(child); childrenNode.Add(node.ID, node); Debug.LogError("添加子节点有误"); } else { childrenNode[child.ID].Init(child); } } }
public void SetParent(IBaseUIForm parent) { parentNode.Init(parent); }