public static void UIMClosePanel(bool isPlayAnimation = false) { WUIManager.UIMCloseAllWindow(); GameObject willClose = UIMGetOpened(WUIManager.currentPanel); if (willClose != null) { Window willCloseComp = willClose.GetComponent <Window>(); willCloseComp.close(isPlayAnimation); } WUIManager.currentPanel = null; }