From 1ab047b5fdd933c38ba0519ec2e83a44512ea8d7 Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期四, 26 三月 2026 17:46:11 +0800
Subject: [PATCH] webgl代码合并 1

---
 Main/System/Login/GameNotice.cs |   22 +++++++++++++++++++---
 1 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/Main/System/Login/GameNotice.cs b/Main/System/Login/GameNotice.cs
index 1701cf9..fcab7a8 100644
--- a/Main/System/Login/GameNotice.cs
+++ b/Main/System/Login/GameNotice.cs
@@ -12,7 +12,13 @@
         {
             if (VersionUtility.Instance.versionInfo == null || noticeShowed)
                 return;
-            var url = VersionUtility.Instance.versionInfo.GetNoticeURL(VersionConfig.Get().branch);
+
+            if (null == VersionConfig.config)
+            {
+                throw new System.Exception("VersionConfig is null when OpenGameNotice, game will pause here");
+            }
+
+            var url = VersionUtility.Instance.versionInfo.GetNoticeURL(VersionConfig.config.branch);
             if (!string.IsNullOrEmpty(url))
             {
                 SDKUtils.Instance.OpenUrl(url);
@@ -31,7 +37,13 @@
         {
             if (VersionUtility.Instance.versionInfo == null)
                 return false;
-            var url = VersionUtility.Instance.versionInfo.GetNoticeURL(VersionConfig.Get().branch);
+
+            if (null == VersionConfig.config)
+            {
+                throw new System.Exception("VersionConfig is null when HasNotice, check VersionConfig.GetAsync for more details");
+            }
+
+            var url = VersionUtility.Instance.versionInfo.GetNoticeURL(VersionConfig.config.branch);
             Debug.LogFormat("鍏憡鍦板潃锛歿0}", url);
             return !string.IsNullOrEmpty(url);
         }
@@ -47,7 +59,11 @@
         {
             if (VersionUtility.Instance.versionInfo == null)
                 return;
-            var url = VersionUtility.Instance.versionInfo.GetNoticeURL(VersionConfig.Get().branch);
+            if (null == VersionConfig.config)
+            {
+                throw new System.Exception("VersionConfig is null when OpenGameNoticeForce, check VersionConfig.GetAsync for more details");
+            }
+            var url = VersionUtility.Instance.versionInfo.GetNoticeURL(VersionConfig.config.branch);
             if (!string.IsNullOrEmpty(url))
             {
                 SDKUtils.Instance.OpenUrl(url);

--
Gitblit v1.8.0