From 1dfda88bc39c2db0b740ea6ec44daf448f7ecaa0 Mon Sep 17 00:00:00 2001 From: MichaelO Date: Fri, 27 Dec 2024 18:53:02 +0800 Subject: [PATCH] updated to v2.12.3 --- Assets/OxGFrame/CHANGELOG.md | 13 +++ .../Scripts/Runtime/Core/CPFrame/CPBase.cs | 6 +- .../Scripts/Runtime/Core/CoreFrames.cs | 79 ++++++++++++++++++- .../Runtime/Core/Implement/FrameBase.cs | 14 ++-- .../Runtime/Core/Implement/FrameManager.cs | 20 +---- .../Scripts/Runtime/Core/SRFrame/SRBase.cs | 15 ++-- .../Scripts/Runtime/Core/SRFrame/SRManager.cs | 3 +- .../Scripts/Runtime/Core/UIFrame/UIBase.cs | 13 +-- .../Scripts/Runtime/Core/UIFrame/UIManager.cs | 14 ++-- .../Runtime/Core/AudioFrame/AudioBase.cs | 8 +- .../Runtime/Core/Implement/MediaBase.cs | 14 ++-- .../Runtime/Core/VideoFrame/VideoBase.cs | 8 +- Assets/OxGFrame/package.json | 2 +- 13 files changed, 147 insertions(+), 62 deletions(-) diff --git a/Assets/OxGFrame/CHANGELOG.md b/Assets/OxGFrame/CHANGELOG.md index ef8fa7c3..f22f6e95 100644 --- a/Assets/OxGFrame/CHANGELOG.md +++ b/Assets/OxGFrame/CHANGELOG.md @@ -1,5 +1,18 @@ # CHANGELOG +## [2.12.3] - 2024-12-27 +- Added to CoreFrames.SRFrame & CoreFrames.UIFrame: + - Can use CheckHasAnyHidingAllGroups() to replace CheckHasAnyHiding(-1). + - Can use CloseAllForAllGroups() to replace CloseAll(-1). + - Can use CloseAllAndExcludedForAllGroups() to replace CloseAllAndExcluded(-1). + - Can use RevealAllForAllGroups() to replace RevealAll(-1). + - Can use HideAllForAllGroups() to replace HideAll(-1). + - Can use HideAllAndExcludedForAllGroups() to replace HideAllExcluded(-1). +- Modified access modifiers of certain methods. +- Modified CoreFrames.SRFrame & CoreFrames.UIFrame: + - Update the rules for CheckHasAnyHiding(). By default, groupId is set to 0, and -1 indicates that all groupIds should be processed. +- Fixed RevealAll not marking hidden as false. + ## [2.12.2] - 2024-11-11 - Updated UniEvent of UniFramework. - Added constructors in EncryptionServices (Editor). diff --git a/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/CPFrame/CPBase.cs b/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/CPFrame/CPBase.cs index 803d446f..8c5c8e58 100644 --- a/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/CPFrame/CPBase.cs +++ b/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/CPFrame/CPBase.cs @@ -62,7 +62,7 @@ private void OnDestroy() public override void OnCreate() { } - public sealed override void InitFirst() + internal sealed override void InitFirst() { base.InitFirst(); } @@ -77,7 +77,7 @@ protected override void OnFixedUpdate(float dt) { } protected override void OnLateUpdate(float dt) { } - public sealed override void Display(object obj) + internal sealed override void Display(object obj) { this.gameObject.SetActive(true); this.OnShow(); @@ -133,7 +133,7 @@ protected override void OnShow(object obj) { } public override void OnReceiveAndRefresh(object obj = null) { } [System.Obsolete("This is not supported in this class.")] - public sealed override void Hide(bool disabledPreClose = false) { } + internal sealed override void Hide(bool disabledPreClose = false) { } [System.Obsolete("This is not supported in this class.")] protected sealed override void CloseSelf() { } diff --git a/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/CoreFrames.cs b/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/CoreFrames.cs index f1635241..7b9da8f1 100644 --- a/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/CoreFrames.cs +++ b/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/CoreFrames.cs @@ -17,6 +17,11 @@ public static class CoreFrames /// internal const int DEFAULT_GROUP_ID = 0; + /// + /// Do all groups + /// + internal const int DO_ALL_GROUPS = -1; + /// /// User Interface /// @@ -77,9 +82,13 @@ public static bool CheckIsHiding(UIBase uiBase) return UIManager.GetInstance().CheckIsHiding(uiBase); } + /// + /// 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 bool CheckHasAnyHiding() { - return UIManager.GetInstance().CheckHasAnyHiding(); + return UIManager.GetInstance().CheckHasAnyHiding(DEFAULT_GROUP_ID); } public static bool CheckHasAnyHiding(int groupId) @@ -87,9 +96,14 @@ public static bool CheckHasAnyHiding(int groupId) return UIManager.GetInstance().CheckHasAnyHiding(groupId); } + public static bool CheckHasAnyHidingForAllGroups() + { + return UIManager.GetInstance().CheckHasAnyHiding(DO_ALL_GROUPS); + } + public static int GetStackByStackCount(string canvasName) { - return UIManager.GetInstance().GetStackByStackCount(0, canvasName); + return UIManager.GetInstance().GetStackByStackCount(DEFAULT_GROUP_ID, canvasName); } public static int GetStackByStackCount(int groupId, string canvasName) @@ -284,6 +298,11 @@ public static void CloseAll(int groupId, bool disabledPreClose = false, bool for UIManager.GetInstance().CloseAll(groupId, disabledPreClose, forceDestroy, false, withoutAssetNames); } + public static void CloseAllForAllGroups(bool disabledPreClose = false, bool forceDestroy = false, params string[] withoutAssetNames) + { + UIManager.GetInstance().CloseAll(DO_ALL_GROUPS, 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 /// @@ -300,6 +319,11 @@ public static void CloseAllAndExcluded(int groupId, bool disabledPreClose = fals UIManager.GetInstance().CloseAll(groupId, disabledPreClose, forceDestroy, true, withoutAssetNames); } + public static void CloseAllAndExcludedForAllGroups(bool disabledPreClose = false, bool forceDestroy = false, params string[] withoutAssetNames) + { + UIManager.GetInstance().CloseAll(DO_ALL_GROUPS, disabledPreClose, forceDestroy, true, withoutAssetNames); + } + /// /// Only allow close stack by stack /// @@ -342,6 +366,11 @@ public static void RevealAll(int groupId) { UIManager.GetInstance().RevealAll(groupId); } + + public static void RevealAllForAllGroups() + { + UIManager.GetInstance().RevealAll(DO_ALL_GROUPS); + } #endregion #region Hide @@ -364,6 +393,11 @@ public static void HideAll(int groupId, params string[] withoutAssetNames) UIManager.GetInstance().HideAll(groupId, false, withoutAssetNames); } + public static void HideAllForAllGroups(params string[] withoutAssetNames) + { + UIManager.GetInstance().HideAll(DO_ALL_GROUPS, 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 /// @@ -377,6 +411,11 @@ public static void HideAllAndExcluded(int groupId, params string[] withoutAssetN { UIManager.GetInstance().HideAll(groupId, true, withoutAssetNames); } + + public static void HideAllAndExcludedForAllGroups(params string[] withoutAssetNames) + { + UIManager.GetInstance().HideAll(DO_ALL_GROUPS, true, withoutAssetNames); + } #endregion } @@ -431,9 +470,13 @@ public static bool CheckIsHiding(SRBase srBase) return SRManager.GetInstance().CheckIsHiding(srBase); } + /// + /// 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 bool CheckHasAnyHiding() { - return SRManager.GetInstance().CheckHasAnyHiding(); + return SRManager.GetInstance().CheckHasAnyHiding(DEFAULT_GROUP_ID); } public static bool CheckHasAnyHiding(int groupId) @@ -441,6 +484,11 @@ public static bool CheckHasAnyHiding(int groupId) return SRManager.GetInstance().CheckHasAnyHiding(groupId); } + public static bool CheckHasAnyHidingForAllGroups() + { + return SRManager.GetInstance().CheckHasAnyHiding(DO_ALL_GROUPS); + } + /// /// Send refresh message to specific with data /// @@ -616,6 +664,11 @@ public static void CloseAll(int groupId, bool disabledPreClose = false, bool for SRManager.GetInstance().CloseAll(groupId, disabledPreClose, forceDestroy, false, withoutAssetNames); } + public static void CloseAllForAllGroups(bool disabledPreClose = false, bool forceDestroy = false, params string[] withoutAssetNames) + { + SRManager.GetInstance().CloseAll(DO_ALL_GROUPS, 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 /// @@ -631,6 +684,11 @@ public static void CloseAllAndExcluded(int groupId, bool disabledPreClose = fals { SRManager.GetInstance().CloseAll(groupId, disabledPreClose, forceDestroy, true, withoutAssetNames); } + + public static void CloseAllAndExcludedForAllGroups(bool disabledPreClose = false, bool forceDestroy = false, params string[] withoutAssetNames) + { + SRManager.GetInstance().CloseAll(DO_ALL_GROUPS, disabledPreClose, forceDestroy, true, withoutAssetNames); + } #endregion #region Reveal @@ -651,6 +709,11 @@ public static void RevealAll(int groupId) { SRManager.GetInstance().RevealAll(groupId); } + + public static void RevealAllForAllGroups() + { + SRManager.GetInstance().RevealAll(DO_ALL_GROUPS); + } #endregion #region Hide @@ -674,6 +737,11 @@ public static void HideAll(int groupId, params string[] withoutAssetNames) SRManager.GetInstance().HideAll(groupId, false, withoutAssetNames); } + public static void HideAllForAllGroups(params string[] withoutAssetNames) + { + SRManager.GetInstance().HideAll(DO_ALL_GROUPS, 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 /// @@ -687,6 +755,11 @@ public static void HideAllAndExcluded(int groupId, params string[] withoutAssetN { SRManager.GetInstance().HideAll(groupId, true, withoutAssetNames); } + + public static void HideAllAndExcludedForAllGroups(params string[] withoutAssetNames) + { + SRManager.GetInstance().HideAll(DO_ALL_GROUPS, true, withoutAssetNames); + } #endregion } diff --git a/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/Implement/FrameBase.cs b/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/Implement/FrameBase.cs index 01b4318a..5d1086c0 100644 --- a/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/Implement/FrameBase.cs +++ b/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/Implement/FrameBase.cs @@ -149,7 +149,7 @@ private void OnValidate() /// /// 綁定與初次初始 /// - public virtual void InitFirst() + internal virtual void InitFirst() { // 未綁定的話就執行綁定流程 if (!this._isBinded) @@ -171,7 +171,7 @@ public virtual void InitFirst() /// 預初始 /// /// - public async UniTask PreInit() + internal async UniTask PreInit() { // 等待異步加載, 進行異步加載動作 await this.OnPreShow(); @@ -202,12 +202,12 @@ protected virtual void OnAutoBind() { } /// 顯示相關流程 /// /// - public abstract void Display(object obj); + internal abstract void Display(object obj); /// /// 隱藏相關流程 /// - public abstract void Hide(bool disabledPreClose); + internal abstract void Hide(bool disabledPreClose); /// /// 開啟時每次都會被呼叫 @@ -268,7 +268,7 @@ public virtual void OnRelease() { } /// 設置名稱 /// /// - public void SetNames(string assetName) + internal void SetNames(string assetName) { this.assetName = assetName; } @@ -277,7 +277,7 @@ public void SetNames(string assetName) /// 設置群組 Id /// /// - public void SetGroupId(int groupId) + internal void SetGroupId(int groupId) { this.groupId = groupId; } @@ -286,7 +286,7 @@ public void SetGroupId(int groupId) /// 設置隱藏開關 /// /// - public void SetHidden(bool isHidden) + internal void SetHidden(bool isHidden) { this.isHidden = isHidden; } diff --git a/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/Implement/FrameManager.cs b/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/Implement/FrameManager.cs index 47369281..2f5b9678 100644 --- a/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/Implement/FrameManager.cs +++ b/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/Implement/FrameManager.cs @@ -324,22 +324,10 @@ public bool CheckHasAnyHiding(int groupId) { foreach (var fBase in this._dictAllCache.Values) { - if (fBase.Peek().groupId == groupId && fBase.Peek().isHidden) return true; - } - - return false; - } - - /// - /// 判斷是否有任一隱藏 - /// - /// - /// - public bool CheckHasAnyHiding() - { - foreach (var fBase in this._dictAllCache.Values) - { - if (fBase.Peek().isHidden) return true; + if (groupId == -1 && fBase.Peek().isHidden) + return true; + else if (fBase.Peek().groupId == groupId && fBase.Peek().isHidden) + return true; } return false; diff --git a/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/SRFrame/SRBase.cs b/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/SRFrame/SRBase.cs index 6e9c96a8..701f4e4a 100644 --- a/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/SRFrame/SRBase.cs +++ b/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/SRFrame/SRBase.cs @@ -10,7 +10,7 @@ public class SRBase : FrameBase public override void OnCreate() { } - public sealed override void InitFirst() + internal sealed override void InitFirst() { base.InitFirst(); } @@ -31,15 +31,20 @@ protected override void OnFixedUpdate(float dt) { } protected override void OnLateUpdate(float dt) { } - public sealed override void Display(object obj) + internal sealed override void Display(object obj) { this.gameObject.SetActive(true); - if (!this.isHidden) this.OnShow(obj); - else this.OnReveal(); + if (!this.isHidden) + this.OnShow(obj); + else + { + this.OnReveal(); + this.SetHidden(false); + } } - public sealed override void Hide(bool disabledPreClose = false) + internal sealed override void Hide(bool disabledPreClose = false) { if (!this.gameObject.activeSelf) return; diff --git a/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/SRFrame/SRManager.cs b/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/SRFrame/SRManager.cs index e2cf2ce7..3306ce3a 100644 --- a/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/SRFrame/SRManager.cs +++ b/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/SRFrame/SRManager.cs @@ -347,7 +347,8 @@ public override void HideAll(int groupId, bool forceHideExcluded = false, params #region 顯示場景 & 關閉場景 protected async UniTask LoadAndDisplay(SRBase srBase, object obj = null) { - if (!srBase.isHidden) await srBase.PreInit(); + if (!srBase.isHidden) + await srBase.PreInit(); srBase.Display(obj); } diff --git a/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/UIFrame/UIBase.cs b/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/UIFrame/UIBase.cs index 2629027b..4af1978e 100644 --- a/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/UIFrame/UIBase.cs +++ b/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/UIFrame/UIBase.cs @@ -48,7 +48,7 @@ public override void OnCreate() { } /// /// 僅執行一次, 只交由 UIManager 加載資源時呼叫初始相關綁定組件 /// - public sealed override void InitFirst() + internal sealed override void InitFirst() { base.InitFirst(); } @@ -83,7 +83,7 @@ protected override void OnLateUpdate(float dt) { } /// /// UIManager 控制調用 Display /// - public sealed override void Display(object obj) + internal sealed override void Display(object obj) { this.gameObject.SetActive(true); @@ -91,16 +91,19 @@ public sealed override void Display(object obj) if (!this.isHidden) { // 啟用 Mask - if (this.autoMask) this._AddMask(); + if (this.autoMask) + this._AddMask(); // 進行顯示初始動作【子類 OnShow】 this.OnShow(obj); } else { // 確保 Mask - if (this.autoMask) this._AddMask(); + if (this.autoMask) + this._AddMask(); // 隱藏顯示 this.OnReveal(); + this.SetHidden(false); } this.Freeze(); @@ -110,7 +113,7 @@ public sealed override void Display(object obj) /// /// UIManager 控制調用 Hide /// - public sealed override void Hide(bool disabledPreClose = false) + internal sealed override void Hide(bool disabledPreClose = false) { if (!this.gameObject.activeSelf) return; diff --git a/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/UIFrame/UIManager.cs b/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/UIFrame/UIManager.cs index d0f157b1..d76dcebb 100644 --- a/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/UIFrame/UIManager.cs +++ b/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/UIFrame/UIManager.cs @@ -798,10 +798,6 @@ public override void HideAll(int groupId, bool forceHideExcluded = false, params #region 開啟窗體 & 關閉窗體 protected async UniTask LoadAndDisplay(UIBase uiBase, object obj = null, bool doStack = true) { - // 非隱藏才正規處理 - if (!uiBase.isHidden) await uiBase.PreInit(); - uiBase.Display(obj); - // 堆疊式管理 (只有非隱藏才進行堆疊計數管理) if (uiBase.uiSetting.stack && !uiBase.isHidden && doStack) { @@ -838,12 +834,16 @@ protected async UniTask LoadAndDisplay(UIBase uiBase, object obj = null, bool do // 最後將物件設置到最後一個節點 uiBase.gameObject.transform.SetAsLastSibling(); } + + // 非隱藏才正規處理 + if (!uiBase.isHidden) + await uiBase.PreInit(); + + uiBase.Display(obj); } protected void ExitAndHide(UIBase uiBase, bool disabledPreClose = false, int extraStack = 0) { - uiBase.Hide(disabledPreClose); - // 堆疊式管理 (只有非隱藏才進行堆疊計數管理) if (uiBase.uiSetting.stack && !uiBase.isHidden) { @@ -858,6 +858,8 @@ protected void ExitAndHide(UIBase uiBase, bool disabledPreClose = false, int ext if (this._dictStackCounter[key] <= 0) this._dictStackCounter.Remove(key); } } + + uiBase.Hide(disabledPreClose); } #endregion diff --git a/Assets/OxGFrame/MediaFrame/Scripts/Runtime/Core/AudioFrame/AudioBase.cs b/Assets/OxGFrame/MediaFrame/Scripts/Runtime/Core/AudioFrame/AudioBase.cs index a9eb7de5..746d6dc0 100644 --- a/Assets/OxGFrame/MediaFrame/Scripts/Runtime/Core/AudioFrame/AudioBase.cs +++ b/Assets/OxGFrame/MediaFrame/Scripts/Runtime/Core/AudioFrame/AudioBase.cs @@ -39,7 +39,7 @@ public class AudioBase : MediaBase [SerializeField, ConditionalField(nameof(_mixerGroupSourceType), false, MixerGroupSourceType.Find)] protected string _mixerGroupName = ""; - public override async UniTask Init() + internal override async UniTask Init() { this._audioSource = this.GetComponent(); bool isInitialized = await this._InitAudio(); @@ -147,7 +147,7 @@ protected override void OnFixedUpdate(float dt = 0f) } } - public override void Play(int loops, float volume) + internal override void Play(int loops, float volume) { if (this._audioSource == null || this._audioSource.clip == null) return; @@ -174,7 +174,7 @@ public override void Play(int loops, float volume) this._isPaused = false; // 取消暫停標記 } - public override void Stop() + internal override void Stop() { if (this._audioSource == null) return; @@ -188,7 +188,7 @@ public override void Stop() this.gameObject.SetActive(false); } - public override void Pause() + internal override void Pause() { if (this._audioSource == null) return; diff --git a/Assets/OxGFrame/MediaFrame/Scripts/Runtime/Core/Implement/MediaBase.cs b/Assets/OxGFrame/MediaFrame/Scripts/Runtime/Core/Implement/MediaBase.cs index 8be83dc3..504b4bd1 100644 --- a/Assets/OxGFrame/MediaFrame/Scripts/Runtime/Core/Implement/MediaBase.cs +++ b/Assets/OxGFrame/MediaFrame/Scripts/Runtime/Core/Implement/MediaBase.cs @@ -101,7 +101,7 @@ internal void HandleFixedUpdate(float dt) /// /// 初始用 /// - public abstract UniTask Init(); + internal abstract UniTask Init(); /// /// 固定每幀被調用 @@ -112,17 +112,17 @@ internal void HandleFixedUpdate(float dt) /// /// 開始播放 /// - public abstract void Play(int loops, float volume); + internal abstract void Play(int loops, float volume); /// /// 停止播放 /// - public abstract void Stop(); + internal abstract void Stop(); /// /// 暫停播放 /// - public abstract void Pause(); + internal abstract void Pause(); /// /// 返回是否播放中 @@ -206,7 +206,7 @@ protected virtual void ResetLoops() /// /// /// - public void SetNames(string assetName, string mediaName) + internal void SetNames(string assetName, string mediaName) { this.assetName = assetName; this.mediaName = mediaName; @@ -215,7 +215,7 @@ public void SetNames(string assetName, string mediaName) #region MEDIA_URL 請求 public const string VIDEO_URLSET = "video_urlset"; public const string AUDIO_URLSET = "audio_urlset"; - public static string GetValueFromUrlCfg(string urlCfg, string key) + internal static string GetValueFromUrlCfg(string urlCfg, string key) { if (string.IsNullOrEmpty(urlCfg)) return string.Empty; @@ -246,7 +246,7 @@ public static string GetValueFromUrlCfg(string urlCfg, string key) /// 取得 UnityWebRequest StreamingAssets 路徑 (OSX and iOS 需要 + file://) /// /// - public static string GetRequestStreamingAssetsPath() + internal static string GetRequestStreamingAssetsPath() { #if UNITY_STANDALONE_OSX || UNITY_IOS return $"file://{Application.streamingAssetsPath}"; diff --git a/Assets/OxGFrame/MediaFrame/Scripts/Runtime/Core/VideoFrame/VideoBase.cs b/Assets/OxGFrame/MediaFrame/Scripts/Runtime/Core/VideoFrame/VideoBase.cs index 11150294..7cf79105 100644 --- a/Assets/OxGFrame/MediaFrame/Scripts/Runtime/Core/VideoFrame/VideoBase.cs +++ b/Assets/OxGFrame/MediaFrame/Scripts/Runtime/Core/VideoFrame/VideoBase.cs @@ -38,7 +38,7 @@ public class VideoBase : MediaBase [SerializeField] protected VideoAspectRatio _aspectRatio = VideoAspectRatio.FitHorizontally; - public override async UniTask Init() + internal override async UniTask Init() { this._videoPlayer = this.GetComponent(); bool isInitialized = await this._InitVideo(); @@ -228,7 +228,7 @@ protected override void OnFixedUpdate(float dt = 0f) } } - public override void Play(int loops, float volume) + internal override void Play(int loops, float volume) { if (this._videoPlayer == null) return; @@ -248,7 +248,7 @@ public override void Play(int loops, float volume) this._isPaused = false; // 取消暫停標記 } - public override void Stop() + internal override void Stop() { if (this._videoPlayer == null) return; @@ -265,7 +265,7 @@ public override void Stop() this.gameObject.SetActive(false); } - public override void Pause() + internal override void Pause() { if (this._videoPlayer == null) return; diff --git a/Assets/OxGFrame/package.json b/Assets/OxGFrame/package.json index 1dd51fff..db35c3a5 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.12.2", + "version": "2.12.3", "unity": "2021.3", "license": "MIT", "samples": [