From 0fa617a09eedf6bdb25eda55fac1d3344859fd93 Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期二, 31 三月 2026 19:46:31 +0800
Subject: [PATCH] webgl
---
Main/System/AssetVersion/AssetVersion.cs | 30 +++++++++++++++++++++++++++++-
1 files changed, 29 insertions(+), 1 deletions(-)
diff --git a/Main/System/AssetVersion/AssetVersion.cs b/Main/System/AssetVersion/AssetVersion.cs
index 0a34c54..84c1b7f 100644
--- a/Main/System/AssetVersion/AssetVersion.cs
+++ b/Main/System/AssetVersion/AssetVersion.cs
@@ -81,6 +81,10 @@
public bool CheckLocalFileValid(bool _completeFile)
{
+#if UNITY_WEBGL
+ // WebGL鏃犳湰鍦版枃浠剁郴缁燂紝璧勬簮鐢盰ooAsset 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
}
--
Gitblit v1.8.0