diff --git a/Assets/QFramework/Toolkits/UIKit/Scripts/UIKit.cs b/Assets/QFramework/Toolkits/UIKit/Scripts/UIKit.cs index e705a5e1..66ae53c3 100644 --- a/Assets/QFramework/Toolkits/UIKit/Scripts/UIKit.cs +++ b/Assets/QFramework/Toolkits/UIKit/Scripts/UIKit.cs @@ -247,6 +247,18 @@ UIKit.HidePanel(""UIHomePanel""); panelSearchKeys.Recycle2Cache(); } + public static void HidePanel(Type type) + { + var panelSearchKeys = PanelSearchKeys.Allocate(); + + panelSearchKeys.PanelType = type; + + UIManager.Instance.HideUI(panelSearchKeys); + + panelSearchKeys.Recycle2Cache(); + } + + #if UNITY_EDITOR [MethodAPI] [APIDescriptionCN("关闭全部界面")] diff --git a/Assets/Scripts/Actions/UIShowAction.cs b/Assets/Scripts/Actions/UIShowAction.cs index 2c7da6be..0555a46c 100644 --- a/Assets/Scripts/Actions/UIShowAction.cs +++ b/Assets/Scripts/Actions/UIShowAction.cs @@ -53,7 +53,7 @@ public class UIShowAction : IAction } else { - UIKit.ClosePanel(ActionHelper.typeDict[uiName]); + UIKit.HidePanel(ActionHelper.typeDict[uiName]); this.Finish(); } }