diff --git a/Assets/OxGFrame/CHANGELOG.md b/Assets/OxGFrame/CHANGELOG.md index e45b6ce9..f8b6efb6 100644 --- a/Assets/OxGFrame/CHANGELOG.md +++ b/Assets/OxGFrame/CHANGELOG.md @@ -1,5 +1,13 @@ # CHANGELOG +## [2.12.0] - 2024-10-24 (rule changed) +- Modified CloseAll, HideAll, RevealAll rules of method for UIFrame and SRFrame. + - Set the default group id to 0, but if you don't want to execute based on the group id and want to do all, can set the group id to -1. + - ex: CloseAll(-1) do all without any group id. + - ex: HideAll(-1) do all without any group id. + - ex: RevealAll(-1) do all without any group id. +- Modified CloseAllAndExcluded and HideAllAndExcluded to support the withoutAssetNames param. + ## [2.11.12] - 2024-10-17 - Optimized the bundle decryption memory allocation method to avoid allocating excessively large memory in a single ReadAllBytes operation. diff --git a/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/CoreFrames.cs b/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/CoreFrames.cs index 6df9d7e7..945f415b 100644 --- a/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/CoreFrames.cs +++ b/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/CoreFrames.cs @@ -12,6 +12,11 @@ namespace OxGFrame.CoreFrame { public static class CoreFrames { + /// + /// Default group id + /// + internal const int DEFAULT_GROUP_ID = 0; + public static class UIFrame { public static bool ignoreTimeScale @@ -200,6 +205,7 @@ public static async UniTask Preload(string packageName, string[] assetNames, uin #region Show /// /// If use prefix "res#" will load from resources else will load from bundle + /// Default group id is 0 /// /// /// @@ -211,12 +217,12 @@ public static async UniTask Preload(string packageName, string[] assetNames, uin public static async UniTask Show(string assetName, object data = null, string awaitingUIAssetName = null, uint priority = 0, Progression progression = null, Transform parent = null) { var packageName = AssetPatcher.GetDefaultPackageName(); - return await UIManager.GetInstance().Show(0, packageName, assetName, data, awaitingUIAssetName, priority, progression, parent); + return await UIManager.GetInstance().Show(DEFAULT_GROUP_ID, packageName, assetName, data, awaitingUIAssetName, priority, progression, parent); } public static async UniTask Show(string packageName, string assetName, object data = null, string awaitingUIAssetName = null, uint priority = 0, Progression progression = null, Transform parent = null) { - return await UIManager.GetInstance().Show(0, packageName, assetName, data, awaitingUIAssetName, priority, progression, parent); + return await UIManager.GetInstance().Show(DEFAULT_GROUP_ID, packageName, assetName, data, awaitingUIAssetName, priority, progression, parent); } public static async UniTask Show(int groupId, string assetName, object data = null, string awaitingUIAssetName = null, uint priority = 0, Progression progression = null, Transform parent = null) @@ -233,12 +239,12 @@ public static async UniTask Show(int groupId, string packageName, string public static async UniTask Show(string assetName, object data = null, string awaitingUIAssetName = null, uint priority = 0, Progression progression = null, Transform parent = null) where T : UIBase { var packageName = AssetPatcher.GetDefaultPackageName(); - return await UIManager.GetInstance().Show(0, packageName, assetName, data, awaitingUIAssetName, priority, progression, parent) as T; + return await UIManager.GetInstance().Show(DEFAULT_GROUP_ID, packageName, assetName, data, awaitingUIAssetName, priority, progression, parent) as T; } public static async UniTask Show(string packageName, string assetName, object data = null, string awaitingUIAssetName = null, uint priority = 0, Progression progression = null, Transform parent = null) where T : UIBase { - return await UIManager.GetInstance().Show(0, packageName, assetName, data, awaitingUIAssetName, priority, progression, parent) as T; + return await UIManager.GetInstance().Show(DEFAULT_GROUP_ID, packageName, assetName, data, awaitingUIAssetName, priority, progression, parent) as T; } public static async UniTask Show(int groupId, string assetName, object data = null, string awaitingUIAssetName = null, uint priority = 0, Progression progression = null, Transform parent = null) where T : UIBase @@ -259,9 +265,15 @@ public static void Close(string assetName, bool disabledPreClose = false, bool f UIManager.GetInstance().Close(assetName, disabledPreClose, forceDestroy); } + /// + /// Default group id is 0, but if you don't want to execute based on the group id and want to do all, can set the group id to -1 + /// + /// + /// + /// public static void CloseAll(bool disabledPreClose = false, bool forceDestroy = false, params string[] withoutAssetNames) { - UIManager.GetInstance().CloseAll(disabledPreClose, forceDestroy, false, withoutAssetNames); + UIManager.GetInstance().CloseAll(DEFAULT_GROUP_ID, disabledPreClose, forceDestroy, false, withoutAssetNames); } public static void CloseAll(int groupId, bool disabledPreClose = false, bool forceDestroy = false, params string[] withoutAssetNames) @@ -269,9 +281,15 @@ public static void CloseAll(int groupId, bool disabledPreClose = false, bool for UIManager.GetInstance().CloseAll(groupId, disabledPreClose, forceDestroy, false, withoutAssetNames); } + /// + /// Default group id is 0, but if you don't want to execute based on the group id and want to do all, can set the group id to -1 + /// + /// + /// + /// public static void CloseAllAndExcluded(bool disabledPreClose = false, bool forceDestroy = false, params string[] withoutAssetNames) { - UIManager.GetInstance().CloseAll(disabledPreClose, forceDestroy, true, withoutAssetNames); + UIManager.GetInstance().CloseAll(DEFAULT_GROUP_ID, disabledPreClose, forceDestroy, true, withoutAssetNames); } public static void CloseAllAndExcluded(int groupId, bool disabledPreClose = false, bool forceDestroy = false, params string[] withoutAssetNames) @@ -287,7 +305,7 @@ public static void CloseAllAndExcluded(int groupId, bool disabledPreClose = fals /// public static void CloseStackByStack(string canvasName, bool disabledPreClose = false, bool forceDestroy = false) { - UIManager.GetInstance().CloseStackByStack(0, canvasName, disabledPreClose, forceDestroy); + UIManager.GetInstance().CloseStackByStack(DEFAULT_GROUP_ID, canvasName, disabledPreClose, forceDestroy); } /// @@ -309,9 +327,12 @@ public static void Reveal(string assetName) UIManager.GetInstance().Reveal(assetName); } + /// + /// Default group id is 0, but if you don't want to execute based on the group id and want to do all, can set the group id to -1 + /// public static void RevealAll() { - UIManager.GetInstance().RevealAll(); + UIManager.GetInstance().RevealAll(DEFAULT_GROUP_ID); } public static void RevealAll(int groupId) @@ -326,9 +347,13 @@ public static void Hide(string assetName) UIManager.GetInstance().Hide(assetName); } + /// + /// Default group id is 0, but if you don't want to execute based on the group id and want to do all, can set the group id to -1 + /// + /// public static void HideAll(params string[] withoutAssetNames) { - UIManager.GetInstance().HideAll(false, withoutAssetNames); + UIManager.GetInstance().HideAll(DEFAULT_GROUP_ID, false, withoutAssetNames); } public static void HideAll(int groupId, params string[] withoutAssetNames) @@ -336,9 +361,13 @@ public static void HideAll(int groupId, params string[] withoutAssetNames) UIManager.GetInstance().HideAll(groupId, false, withoutAssetNames); } + /// + /// Default group id is 0, but if you don't want to execute based on the group id and want to do all, can set the group id to -1 + /// + /// public static void HideAllAndExcluded(params string[] withoutAssetNames) { - UIManager.GetInstance().HideAll(true, withoutAssetNames); + UIManager.GetInstance().HideAll(DEFAULT_GROUP_ID, true, withoutAssetNames); } public static void HideAllAndExcluded(int groupId, params string[] withoutAssetNames) @@ -505,6 +534,7 @@ public static async UniTask Preload(string packageName, string[] assetNames, uin #region Show /// /// If use prefix "res#" will load from resources else will load from bundle + /// Default group id is 0 /// /// /// @@ -516,12 +546,12 @@ public static async UniTask Preload(string packageName, string[] assetNames, uin public static async UniTask Show(string assetName, object data = null, string awaitingUIAssetName = null, uint priority = 0, Progression progression = null, Transform parent = null) { var packageName = AssetPatcher.GetDefaultPackageName(); - return await SRManager.GetInstance().Show(0, packageName, assetName, data, awaitingUIAssetName, priority, progression, parent); + return await SRManager.GetInstance().Show(DEFAULT_GROUP_ID, packageName, assetName, data, awaitingUIAssetName, priority, progression, parent); } public static async UniTask Show(string packageName, string assetName, object data = null, string awaitingUIAssetName = null, uint priority = 0, Progression progression = null, Transform parent = null) { - return await SRManager.GetInstance().Show(0, packageName, assetName, data, awaitingUIAssetName, priority, progression, parent); + return await SRManager.GetInstance().Show(DEFAULT_GROUP_ID, packageName, assetName, data, awaitingUIAssetName, priority, progression, parent); } public static async UniTask Show(int groupId, string assetName, object data = null, string awaitingUIAssetName = null, uint priority = 0, Progression progression = null, Transform parent = null) @@ -538,12 +568,12 @@ public static async UniTask Show(int groupId, string packageName, string public static async UniTask Show(string assetName, object data = null, string awaitingUIAssetName = null, uint priority = 0, Progression progression = null, Transform parent = null) where T : SRBase { var packageName = AssetPatcher.GetDefaultPackageName(); - return await SRManager.GetInstance().Show(0, packageName, assetName, data, awaitingUIAssetName, priority, progression, parent) as T; + return await SRManager.GetInstance().Show(DEFAULT_GROUP_ID, packageName, assetName, data, awaitingUIAssetName, priority, progression, parent) as T; } public static async UniTask Show(string packageName, string assetName, object data = null, string awaitingUIAssetName = null, uint priority = 0, Progression progression = null, Transform parent = null) where T : SRBase { - return await SRManager.GetInstance().Show(0, packageName, assetName, data, awaitingUIAssetName, priority, progression, parent) as T; + return await SRManager.GetInstance().Show(DEFAULT_GROUP_ID, packageName, assetName, data, awaitingUIAssetName, priority, progression, parent) as T; } public static async UniTask Show(int groupId, string assetName, object data = null, string awaitingUIAssetName = null, uint priority = 0, Progression progression = null, Transform parent = null) where T : SRBase @@ -564,9 +594,15 @@ public static void Close(string assetName, bool disabledPreClose = false, bool f SRManager.GetInstance().Close(assetName, disabledPreClose, forceDestroy); } + /// + /// Default group id is 0, but if you don't want to execute based on the group id and want to do all, can set the group id to -1 + /// + /// + /// + /// public static void CloseAll(bool disabledPreClose = false, bool forceDestroy = false, params string[] withoutAssetNames) { - SRManager.GetInstance().CloseAll(disabledPreClose, forceDestroy, false, withoutAssetNames); + SRManager.GetInstance().CloseAll(DEFAULT_GROUP_ID, disabledPreClose, forceDestroy, false, withoutAssetNames); } public static void CloseAll(int groupId, bool disabledPreClose = false, bool forceDestroy = false, params string[] withoutAssetNames) @@ -574,9 +610,15 @@ public static void CloseAll(int groupId, bool disabledPreClose = false, bool for SRManager.GetInstance().CloseAll(groupId, disabledPreClose, forceDestroy, false, withoutAssetNames); } + /// + /// Default group id is 0, but if you don't want to execute based on the group id and want to do all, can set the group id to -1 + /// + /// + /// + /// public static void CloseAllAndExcluded(bool disabledPreClose = false, bool forceDestroy = false, params string[] withoutAssetNames) { - SRManager.GetInstance().CloseAll(disabledPreClose, forceDestroy, true, withoutAssetNames); + SRManager.GetInstance().CloseAll(DEFAULT_GROUP_ID, disabledPreClose, forceDestroy, true, withoutAssetNames); } public static void CloseAllAndExcluded(int groupId, bool disabledPreClose = false, bool forceDestroy = false, params string[] withoutAssetNames) @@ -591,9 +633,12 @@ public static void Reveal(string assetName) SRManager.GetInstance().Reveal(assetName); } + /// + /// Default group id is 0, but if you don't want to execute based on the group id and want to do all, can set the group id to -1 + /// public static void RevealAll() { - SRManager.GetInstance().RevealAll(); + SRManager.GetInstance().RevealAll(DEFAULT_GROUP_ID); } public static void RevealAll(int groupId) @@ -610,17 +655,26 @@ public static void Hide(string assetName) public static void HideAll(params string[] withoutAssetNames) { - SRManager.GetInstance().HideAll(false, withoutAssetNames); + SRManager.GetInstance().HideAll(DEFAULT_GROUP_ID, false, withoutAssetNames); } + /// + /// Default group id is 0, but if you don't want to execute based on the group id and want to do all, can set the group id to -1 + /// + /// + /// public static void HideAll(int groupId, params string[] withoutAssetNames) { SRManager.GetInstance().HideAll(groupId, false, withoutAssetNames); } + /// + /// Default group id is 0, but if you don't want to execute based on the group id and want to do all, can set the group id to -1 + /// + /// public static void HideAllAndExcluded(params string[] withoutAssetNames) { - SRManager.GetInstance().HideAll(true, withoutAssetNames); + SRManager.GetInstance().HideAll(DEFAULT_GROUP_ID, true, withoutAssetNames); } public static void HideAllAndExcluded(int groupId, params string[] withoutAssetNames) diff --git a/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/Implement/FrameManager.cs b/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/Implement/FrameManager.cs index 34c02c46..47369281 100644 --- a/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/Implement/FrameManager.cs +++ b/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/Implement/FrameManager.cs @@ -573,14 +573,6 @@ public async virtual UniTask Show(int groupId, string packageName, string ass /// public virtual void Close(string assetName, bool disabledPreClose = false, bool forceDestroy = false) { } - /// - /// 全部關閉 - /// - /// - /// - /// - public virtual void CloseAll(bool disabledPreClose = false, bool forceDestroy = false, bool forceCloseExcluded = false, params string[] withoutAssetNames) { } - /// /// 透過 id 群組進行全部關閉 /// @@ -598,11 +590,6 @@ public virtual void CloseAll(int groupId, bool disabledPreClose = false, bool fo /// public virtual void Reveal(string assetName) { } - /// - /// 全部解除隱藏 (只允許 Hide, 如果透過 Close 則無法進行 Reveal) - /// - public virtual void RevealAll() { } - /// /// 透過 id 群組進行全部解除隱藏 (只允許 Hide, 如果透過 Close 則無法進行 Reveal) /// @@ -617,11 +604,6 @@ public virtual void RevealAll(int groupId) { } /// public virtual void Hide(string assetName) { } - /// - /// 全部隱藏 (可透過 Show 或者 Reveal 進行顯示, 差別在於初始行為) - /// - public virtual void HideAll(bool forceHideExcluded = false, params string[] withoutAssetNames) { } - /// /// 透過 id 群組進行全部隱藏 (可透過 Show 或者 Reveal 進行顯示, 差別在於初始行為) /// diff --git a/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/SRFrame/SRManager.cs b/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/SRFrame/SRManager.cs index 515e17c7..863ba156 100644 --- a/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/SRFrame/SRManager.cs +++ b/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/SRFrame/SRManager.cs @@ -178,46 +178,6 @@ public override void Close(string assetName, bool disabledPreClose = false, bool this._Close(assetName, disabledPreClose, forceDestroy, false); } - public override void CloseAll(bool disabledPreClose = false, bool forceDestroy = false, bool forceCloseExcluded = false, params string[] withoutAssetNames) - { - if (this._dictAllCache.Count == 0) return; - - foreach (FrameStack stack in this._dictAllCache.Values.ToArray()) - { - // prevent preload mode - if (stack.Count() == 0) continue; - - string assetName = stack.assetName; - - var srBase = stack.Peek(); - - // 檢查排除執行的 SR - bool checkWithout = false; - if (withoutAssetNames.Length > 0) - { - for (int i = 0; i < withoutAssetNames.Length; i++) - { - if (assetName == withoutAssetNames[i]) - { - checkWithout = true; - break; - } - } - } - - // 排除在外的 SR 直接略過處理 - if (checkWithout) continue; - - // 如果沒有強制 Destroy + 不是顯示狀態則直接略過處理 - if (!forceDestroy && !this.CheckIsShowing(srBase)) continue; - - // 如有啟用 CloseAll 需跳過開關, 則不列入關閉執行 - if (!forceCloseExcluded && srBase.srSetting.whenCloseAllToSkip) continue; - - this._Close(assetName, disabledPreClose, forceDestroy, true); - } - } - public override void CloseAll(int groupId, bool disabledPreClose = false, bool forceDestroy = false, bool forceCloseExcluded = false, params string[] withoutAssetNames) { if (this._dictAllCache.Count == 0) return; @@ -231,7 +191,8 @@ public override void CloseAll(int groupId, bool disabledPreClose = false, bool f var srBase = stack.Peek(); - if (srBase.groupId != groupId) continue; + // 如果 -1 表示不管任何 groupId + if (groupId != -1 && srBase.groupId != groupId) continue; // 檢查排除執行的 SR bool checkWithout = false; @@ -292,25 +253,6 @@ public override void Reveal(string assetName) this._Reveal(assetName); } - public override void RevealAll() - { - if (this._dictAllCache.Count == 0) return; - - foreach (FrameStack stack in this._dictAllCache.Values) - { - // prevent preload mode - if (stack.Count() == 0) continue; - - string assetName = stack.assetName; - - var srBase = stack.Peek(); - - if (!srBase.isHidden) continue; - - this._Reveal(assetName); - } - } - public override void RevealAll(int groupId) { if (this._dictAllCache.Count == 0) return; @@ -324,7 +266,8 @@ public override void RevealAll(int groupId) var srBase = stack.Peek(); - if (srBase.groupId != groupId) continue; + // 如果 -1 表示不管任何 groupId + if (groupId != -1 && srBase.groupId != groupId) continue; if (!srBase.isHidden) continue; @@ -360,43 +303,6 @@ public override void Hide(string assetName) this._Hide(assetName); } - public override void HideAll(bool forceHideExcluded = false, params string[] withoutAssetNames) - { - if (this._dictAllCache.Count == 0) return; - - foreach (FrameStack stack in this._dictAllCache.Values) - { - // prevent preload mode - if (stack.Count() == 0) continue; - - string assetName = stack.assetName; - - var srBase = stack.Peek(); - - // 檢查排除執行的 SR - bool checkWithout = false; - if (withoutAssetNames.Length > 0) - { - for (int i = 0; i < withoutAssetNames.Length; i++) - { - if (assetName == withoutAssetNames[i]) - { - checkWithout = true; - break; - } - } - } - - // 排除在外的 SR 直接略過處理 - if (checkWithout) continue; - - // 如有啟用 HideAll 需跳過開關, 則不列入關閉執行 - if (!forceHideExcluded && srBase.srSetting.whenHideAllToSkip) continue; - - this._Hide(assetName); - } - } - public override void HideAll(int groupId, bool forceHideExcluded = false, params string[] withoutAssetNames) { if (this._dictAllCache.Count == 0) return; @@ -410,7 +316,8 @@ public override void HideAll(int groupId, bool forceHideExcluded = false, params var srBase = stack.Peek(); - if (srBase.groupId != groupId) continue; + // 如果 -1 表示不管任何 groupId + if (groupId != -1 && srBase.groupId != groupId) continue; // 檢查排除執行的 SR bool checkWithout = false; diff --git a/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/UIFrame/UIManager.cs b/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/UIFrame/UIManager.cs index 504e0290..ad15c5f5 100644 --- a/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/UIFrame/UIManager.cs +++ b/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/UIFrame/UIManager.cs @@ -610,46 +610,6 @@ public override void Close(string assetName, bool disabledPreClose = false, bool this._Close(assetName, disabledPreClose, forceDestroy, false); } - public override void CloseAll(bool disabledPreClose = false, bool forceDestroy = false, bool forceCloseExcluded = false, params string[] withoutAssetNames) - { - if (this._dictAllCache.Count == 0) return; - - foreach (FrameStack stack in this._dictAllCache.Values.ToArray()) - { - // prevent preload mode - if (stack.Count() == 0) continue; - - string assetName = stack.assetName; - - var uiBase = stack.Peek(); - - // 檢查排除執行的 UI - bool checkWithout = false; - if (withoutAssetNames.Length > 0) - { - for (int i = 0; i < withoutAssetNames.Length; i++) - { - if (assetName == withoutAssetNames[i]) - { - checkWithout = true; - break; - } - } - } - - // 排除在外的 UI 直接略過處理 - if (checkWithout) continue; - - // 如果沒有強制 Destroy + 不是顯示狀態則直接略過處理 - if (!forceDestroy && !this.CheckIsShowing(uiBase) && !uiBase.allowInstantiate) continue; - - // 如有啟用 CloseAll 需跳過開關, 則不列入關閉執行 - if (!forceCloseExcluded && uiBase.uiSetting.whenCloseAllToSkip) continue; - - this._Close(assetName, disabledPreClose, forceDestroy, true); - } - } - public override void CloseAll(int groupId, bool disabledPreClose = false, bool forceDestroy = false, bool forceCloseExcluded = false, params string[] withoutAssetNames) { if (this._dictAllCache.Count == 0) return; @@ -663,7 +623,8 @@ public override void CloseAll(int groupId, bool disabledPreClose = false, bool f var uiBase = stack.Peek(); - if (uiBase.groupId != groupId) continue; + // 如果 -1 表示不管任何 groupId + if (groupId != -1 && uiBase.groupId != groupId) continue; // 檢查排除執行的 UI bool checkWithout = false; @@ -742,25 +703,6 @@ public override void Reveal(string assetName) this._Reveal(assetName); } - public override void RevealAll() - { - if (this._dictAllCache.Count == 0) return; - - foreach (FrameStack stack in this._dictAllCache.Values) - { - // prevent preload mode - if (stack.Count() == 0) continue; - - string assetName = stack.assetName; - - var uiBase = stack.Peek(); - - if (!uiBase.isHidden) continue; - - this._Reveal(assetName); - } - } - public override void RevealAll(int groupId) { if (this._dictAllCache.Count == 0) return; @@ -774,7 +716,8 @@ public override void RevealAll(int groupId) var uiBase = stack.Peek(); - if (uiBase.groupId != groupId) continue; + // 如果 -1 表示不管任何 groupId + if (groupId != -1 && uiBase.groupId != groupId) continue; if (!uiBase.isHidden) continue; @@ -810,44 +753,6 @@ public override void Hide(string assetName) this._Hide(assetName); } - public override void HideAll(bool forceHideExcluded = false, params string[] withoutAssetNames) - { - if (this._dictAllCache.Count == 0) return; - - // 需要注意緩存需要 temp 出來, 因為如果迴圈裡有功能直接對緩存進行操作會出錯 - foreach (FrameStack stack in this._dictAllCache.Values) - { - // prevent preload mode - if (stack.Count() == 0) continue; - - string assetName = stack.assetName; - - var uiBase = stack.Peek(); - - // 檢查排除執行的 UI - bool checkWithout = false; - if (withoutAssetNames.Length > 0) - { - for (int i = 0; i < withoutAssetNames.Length; i++) - { - if (assetName == withoutAssetNames[i]) - { - checkWithout = true; - break; - } - } - } - - // 排除在外的 UI 直接略過處理 - if (checkWithout) continue; - - // 如有啟用 HideAll 需跳過開關, 則不列入關閉執行 - if (!forceHideExcluded && !uiBase.reverseChanges && uiBase.uiSetting.whenHideAllToSkip) continue; - - this._Hide(assetName); - } - } - public override void HideAll(int groupId, bool forceHideExcluded = false, params string[] withoutAssetNames) { if (this._dictAllCache.Count == 0) return; @@ -862,7 +767,8 @@ public override void HideAll(int groupId, bool forceHideExcluded = false, params var uiBase = stack.Peek(); - if (uiBase.groupId != groupId) continue; + // 如果 -1 表示不管任何 groupId + if (groupId != -1 && uiBase.groupId != groupId) continue; // 檢查排除執行的 UI bool checkWithout = false; diff --git a/Assets/OxGFrame/package.json b/Assets/OxGFrame/package.json index f04caa4d..8dcb7a11 100644 --- a/Assets/OxGFrame/package.json +++ b/Assets/OxGFrame/package.json @@ -2,7 +2,7 @@ "name": "com.michaelo.oxgframe", "displayName": "OxGFrame", "description": "The OxGFrame is a framework based on Unity for accelerating game development. Supports multi-platform Win, OSX, Android, iOS, WebGL.", - "version": "2.11.12", + "version": "2.12.0", "unity": "2021.3", "license": "MIT", "samples": [