public void setState(bool isFold) { if (treeMenu == null) { treeMenu = NGUITools.FindInParents <TreeMenu>(gameObject); } sprite.spriteName = treeMenu.getTreeItemSprite(false, nodeLevel, isFold); this.isFold = isFold; }
void Start() { //Nodes = new List<TreeMenuItem>(); treeMenu = NGUITools.FindInParents <TreeMenu>(gameObject); }