public bool PopTop() { int num = uiNameList.Count; if (num > 0) { string name = uiNameList[uiNameList.Count - 1]; GameObject ui = getLayer(name); if (ui != null) { UIData data = ui.GetComponent <UIData>(); if (data.GetFreePop() && data.GetOnClickPop()) { Pop(name); return(true); } } } return(false); }