public static void CloseUI(UILogic ui, Action callback = null) { if (ui == null || ui.bShow == false) { return; } ui.HideWindow(callback); if (ui.Parent != null) { return; } m_uiHandler.Remove(ui); if (m_data.CurrentMainUI == ui) { m_data.CurrentMainUI = null; } ShowCachedUI(); }