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/AssetVersion/InGameDownTestUtility.cs | 47 ++++++++++++++++++++++++++++-------------------
1 files changed, 28 insertions(+), 19 deletions(-)
diff --git a/Main/System/AssetVersion/InGameDownTestUtility.cs b/Main/System/AssetVersion/InGameDownTestUtility.cs
index e9166c4..caa503a 100644
--- a/Main/System/AssetVersion/InGameDownTestUtility.cs
+++ b/Main/System/AssetVersion/InGameDownTestUtility.cs
@@ -3,6 +3,8 @@
using UnityEngine;
using System.IO;
using System;
+using Cysharp.Threading.Tasks;
+
#if UNITY_EDITOR
using UnityEditor;
#endif
@@ -51,33 +53,40 @@
[RuntimeInitializeOnLoadMethod]
public static void Init()
{
- if (InGameDownTestUtility.enable)
- {
- VersionConfig.Get().assetAccess = InstalledAsset.NullAsset;
- }
- else
- {
- VersionConfig.Get().assetAccess = InstalledAsset.IngoreDownLoad;
- }
+ VersionConfig.GetAsync().ContinueWith(config => {
+ if (InGameDownTestUtility.enable)
+ {
+ config.assetAccess = InstalledAsset.NullAsset;
+ }
+ else
+ {
+ config.assetAccess = InstalledAsset.IngoreDownLoad;
+ }
- VersionConfig.Get().partAssetPackage = InGameDownTestUtility.isPartPackage;
+ config.partAssetPackage = InGameDownTestUtility.isPartPackage;
+ }).Forget();
+
}
#endif
public static bool GetReadVerionEx()
{
#if UNITY_EDITOR
- //鐢熸垚VersionConfigEx.txt 鎻愪緵缁橝OT鍚姩鏃朵娇鐢�
- var json = JsonUtility.ToJson(VersionConfig.Get());
- string versionConfigExFile = Application.dataPath + "/Resources/VersionConfigEx.txt";
- if (File.Exists(versionConfigExFile))
+ VersionConfig.GetAsync().ContinueWith(config =>
{
- File.Delete(versionConfigExFile);
- }
- File.WriteAllText(versionConfigExFile, json);
- AssetDatabase.SaveAssets();
- AssetDatabase.Refresh();
- Debug.Log("鍚屾VersionConfigEx.txt鎴愬姛");
+ //鐢熸垚VersionConfigEx.txt 鎻愪緵缁橝OT鍚姩鏃朵娇鐢�
+ var json = JsonUtility.ToJson(config);
+ string versionConfigExFile = Application.dataPath + "/Resources/VersionConfigEx.txt";
+ if (File.Exists(versionConfigExFile))
+ {
+ File.Delete(versionConfigExFile);
+ }
+ File.WriteAllText(versionConfigExFile, json);
+ AssetDatabase.SaveAssets();
+ AssetDatabase.Refresh();
+ Debug.Log("鍚屾VersionConfigEx.txt鎴愬姛");
+ }).Forget();
+
#endif
return enable && isReadVesionEx;
}
--
Gitblit v1.8.0