Example #1
0
 private void getComponent( )
 {
     m_container = transform.Find("Viewport/Content");
     if (m_container.childCount.Equals(0))
     {
         throw new Exception("UITreeNode Template can not be null! Create a Template!");
     }
     TreeRootNode = m_container.GetChild(0).GetComponent <UITreeNode>();
 }
 protected void closeChildren( )
 {
     for (int i = 0; i < _children.Count; i++)
     {
         UITreeNode node = _children[i].GetComponent <UITreeNode>();
         node.RemoveListener();
         node.closeChildren();
     }
     UITree.push(_children);
     _children = new List <GameObject>();
 }