public void OnDestroy() { Destroy(); foreach (var item in menuTree) { (item as MenuTreeItem).OnDestroy(); } menuTree = null; MenuPopup.Close(); }
public void OnEnable() { SetSize(isPopup); menuTree = new MenuTree(new TreeViewState(), GetMenuHeight(), new List <MenuTreeItem>(), OnSelectItemClick, !isPopup); InitOther(); BuildMenuTree(); foreach (var item in menuTree) { (item as MenuTreeItem).OnEnable(); } }