From 51b0f6ed9f4e1d3bb6f8144470b46908c7699a96 Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期一, 11 五月 2026 16:20:37 +0800
Subject: [PATCH] Merge branch 'master' into h5version
---
Main/System/AssetVersion/DownLoadAndDiscompressHotTask.cs | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/Main/System/AssetVersion/DownLoadAndDiscompressHotTask.cs b/Main/System/AssetVersion/DownLoadAndDiscompressHotTask.cs
index 2ec532b..d42ea66 100644
--- a/Main/System/AssetVersion/DownLoadAndDiscompressHotTask.cs
+++ b/Main/System/AssetVersion/DownLoadAndDiscompressHotTask.cs
@@ -45,6 +45,15 @@
public void Prepare(List<AssetVersion> _downLoadTasks, Action _downLoadOkCallBack)
{
+#if UNITY_WEBGL
+ // WebGL 涓嬫枃浠朵笅杞界敱 YooAsset WebPlayMode 澶勭悊锛岃烦杩囨棫鐨勬枃浠朵笅杞芥祦绋�
+ Debug.Log("[DownLoadAndDiscompressHotTask] WebGL 骞冲彴璺宠繃鏂囦欢涓嬭浇锛孻ooAsset 璐熻矗璧勬簮鍔犺浇");
+ foreach (var asset in _downLoadTasks)
+ asset.localValid = true;
+ step = Step.Completed;
+ _downLoadOkCallBack?.Invoke();
+ return;
+#endif
tasks = _downLoadTasks;
downLoadOkCallBack = _downLoadOkCallBack;
@@ -92,13 +101,16 @@
protected async UniTask Co_StartDownLoad()
{
+ var config = await VersionConfig.GetAsync();
+
while (tasks.Count > 0)
{
DownloadHotMgr.Instance.Prepare();
+
for (int i = 0; i < tasks.Count; i++)
{
var assetVersion = tasks[i];
- var remoteURL = StringUtility.Concat(VersionUtility.Instance.versionInfo.GetResourcesURL(VersionConfig.Get().branch), Language.fixPath, "/", assetVersion.relativePath);
+ var remoteURL = StringUtility.Concat(VersionUtility.Instance.versionInfo.GetResourcesURL(config.branch), Language.fixPath, "/", assetVersion.relativePath);
var localURL = StringUtility.Concat(ResourcesPath.Instance.ExternalStorePath, assetVersion.relativePath);
DownloadHotMgr.Instance.AddTask(new DownloadHotTask(remoteURL, localURL));
}
--
Gitblit v1.8.0