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/InGameDownLoad.cs | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/Main/System/AssetVersion/InGameDownLoad.cs b/Main/System/AssetVersion/InGameDownLoad.cs
index 2581672..6fbdfeb 100644
--- a/Main/System/AssetVersion/InGameDownLoad.cs
+++ b/Main/System/AssetVersion/InGameDownLoad.cs
@@ -4,6 +4,7 @@
using System;
using System.Text.RegularExpressions;
using LitJson;
+using Cysharp.Threading.Tasks;
public class InGameDownLoad : SingletonMonobehaviour<InGameDownLoad>
@@ -147,13 +148,21 @@
DownloadHotMgr.Instance.Prepare();
+ var versionConfig = VersionConfig.config;
+
+ if (null == versionConfig)
+ {
+ // 濡傛灉鍓嶉潰閮芥病鑾峰彇鍒伴偅涓�瀹氭槸鍝噷鍑洪棶棰樹簡 浠庤繖閲屾墦鏂�
+ throw new Exception("VersionConfig is null when AssignTasks, game will pause here");
+ }
+
for (int i = 0; i < this.assets.Count; i++)
{
var assetVersion = this.assets[i];
totalSize += assetVersion.size;//缁熻璧勬簮鎬诲ぇ灏�
//娣诲姞涓嬭浇浠诲姟
- var remoteURL = StringUtility.Concat(VersionUtility.Instance.versionInfo.GetResourcesURL(VersionConfig.Get().branch), Language.fixPath, "/", assetVersion.relativePath);
+ var remoteURL = StringUtility.Concat(VersionUtility.Instance.versionInfo.GetResourcesURL(versionConfig.branch), Language.fixPath, "/", assetVersion.relativePath);
var localURL = StringUtility.Concat(ResourcesPath.Instance.ExternalStorePath, assetVersion.relativePath);
DownloadHotMgr.Instance.AddTask(new DownloadHotTask(remoteURL, localURL, assetVersion));
}
--
Gitblit v1.8.0