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/ClientVersion/VersionUtility.cs |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/Main/System/ClientVersion/VersionUtility.cs b/Main/System/ClientVersion/VersionUtility.cs
index 1ad3e53..664d822 100644
--- a/Main/System/ClientVersion/VersionUtility.cs
+++ b/Main/System/ClientVersion/VersionUtility.cs
@@ -10,13 +10,14 @@
 using LitJson;
 using System.IO;
 using System.Text;
+using Cysharp.Threading.Tasks;
 
 
 
 public class VersionUtility : Singleton<VersionUtility>
 {
     // public static readonly string[] VERSION_URL = new string[] {
-    //     "http://xssgcenter.secondworld.net.cn:11000/center/appversion_new.php/?"};
+    //     "http://gamecenter.secondworld.net.cn:11000/center/appversion_new.php/?"};
 
     public string androidRoot { get { return string.Empty;/*StringUtility.Concat(SDKUtils.Instance.DeviceRootPath, "/", VersionConfig.Get().bundleIdentifier);*/ } }
 
@@ -228,13 +229,13 @@
     /// 鏄惁涓篿os瀹℃牳鏃堕棿鍐�
     /// </summary>
     /// <returns></returns>
-    public bool InIosAuditTime()
+    public async UniTask<bool> InIosAuditTime()
     {
         DateTime dateTime;
 
         try
         {
-            var textAsset = Resources.Load<UnityEngine.TextAsset>("Config/AuditTime");
+            var textAsset = await Resources.LoadAsync<UnityEngine.TextAsset>("Config/AuditTime") as UnityEngine.TextAsset;
             var content = string.Empty;
             if (textAsset != null)
             {
@@ -261,7 +262,14 @@
 
     public bool NeedDownAsset()
     {
-        if (versionInfo != null && versionInfo.downAsset == 1 && VersionConfig.Get().assetAccess != InstalledAsset.IngoreDownLoad)
+        if  (VersionConfig.config == null)
+        {
+            VersionConfig.GetAsync().Forget();
+            Debug.LogError("VersionConfig is null when check NeedDownAsset, check VersionConfig.GetAsync for more details");
+            return false;
+        }
+
+        if (versionInfo != null && versionInfo.downAsset == 1 && VersionConfig.config.assetAccess != InstalledAsset.IngoreDownLoad)
         {
             return true;
         }

--
Gitblit v1.8.0