private void showUI(string uiName, Action callBack = null, params object[] args) { BaseUI targetUI = this.getUI(uiName); if (targetUI != null) { targetUI.gameObject.SetActive(true); if (callBack != null) { callBack(); } targetUI.onShow(args); } else { this.openUI( uiName, () => { if (callBack != null) { callBack(); } BaseUI ui = this.getUI(uiName); ui.onShow(args); } ); } }