yyl
2026-03-31 0fa617a09eedf6bdb25eda55fac1d3344859fd93
Main/System/AssetVersion/AssetVersion.cs
@@ -81,6 +81,10 @@
    public bool CheckLocalFileValid(bool _completeFile)
    {
#if UNITY_WEBGL
        // WebGL无本地文件系统,资源由YooAsset WebPlayMode管理
        return true;
#else
        if (_completeFile)
        {
            var path = StringUtility.Concat(ResourcesPath.Instance.ExternalStorePath, m_RelativePath);
@@ -139,6 +143,7 @@
        }
        return true;
#endif
    }
    // 检查外部存储文件是否存在
@@ -148,6 +153,29 @@
    {
        string path = string.Concat(ResourcesPath.Instance.ExternalStorePath, m_RelativePath);
#if UNITY_WEBGL
        // WebGL无本地文件系统,直接走流式加载路径
        if (!m_RelativePath.Contains(".txt"))
        {
            if (otherAssetInfo == null || string.IsNullOrEmpty(otherAssetInfo.relativePath))
                return false;
            if (otherAssetInfo.size != size)
            {
                Debug.LogFormat("StreamingAssetPath 文件大小不对{0}-{1}", size, otherAssetInfo.size);
                return false;
            }
            if (otherAssetInfo.md5 != md5)
            {
                Debug.LogFormat("StreamingAssetPath 文件md5不对{0}-{1}", md5, otherAssetInfo.md5);
                return false;
            }
            return true;
        }
        return true;
#else
        if (!File.Exists(path) && !m_RelativePath.Contains(".txt"))
        {
            //Debug.LogFormat("转查StreamingAssetPath - 文件不存在 {0} ", path);
@@ -170,7 +198,7 @@
        }
        return CheckLocalFileValid(false);
#endif
    }