三国卡牌客户端基础资源仓库
yyl
2025-05-20 ad754b0ed9a65f2ca8d705210beab9b055fe2664
Assets/Launch/Common/AssetVersion.cs
@@ -1,5 +1,6 @@
using UnityEngine;
using System.IO;
using System.Collections.Generic;
namespace LaunchCommon
{
@@ -52,9 +53,8 @@
            }
        }
        public bool CheckLocalFileValid()
        //checkList 用于外部检查文件下载后是否一致,不包含没有文件的情况
        public bool CheckLocalFileValid(List<bool> checkList = null)
        {
            string path = StringUtility.Contact(ResourcesPath.Instance.ExternalStorePath, m_RelativePath);
            var fileInfo = new FileInfo(path);
@@ -66,12 +66,20 @@
            }
            if (fileInfo.Length != size)
            {
                if (checkList != null && checkList.Count == 0)
                {
                    checkList.Add(false);
                }
                Debug.LogFormat("{0}文件大小不对{1}-{2}", path, size, fileInfo.Length);
                return false;
            }
            var fileMD5 = FileExtersion.GetMD5HashFromFile(path);
            if (fileMD5 != md5)
            {
                if (checkList != null && checkList.Count == 0)
                {
                    checkList.Add(false);
                }
                Debug.LogFormat("{0}文件md5不对{1}-{2}", path, md5, fileMD5);
                return false;
            }