yyl
2026-03-26 1ab047b5fdd933c38ba0519ec2e83a44512ea8d7
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));
        }