diff --git a/Assets/YooAsset/Editor/EditorTools.cs b/Assets/YooAsset/Editor/EditorTools.cs index c7283a22..03fbc34a 100644 --- a/Assets/YooAsset/Editor/EditorTools.cs +++ b/Assets/YooAsset/Editor/EditorTools.cs @@ -496,14 +496,6 @@ namespace YooAsset.Editor return fileInfo.Length; } - /// - /// 获取文件的哈希值 - /// - public static string GetFileCRC32(string filePath) - { - return HashUtility.FileCRC32(filePath); - } - /// /// 读取文件的所有文本内容 /// diff --git a/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs b/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs index 6b668412..2442eb63 100644 --- a/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs +++ b/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs @@ -413,6 +413,9 @@ namespace YooAsset return operation; } + /// + /// 获取指定版本的缓存信息 + /// public GetAllCacheFileInfosOperation GetAllCacheFileInfosAsync(string packageVersion) { DebugCheckInitialize(); diff --git a/Assets/YooAsset/Runtime/Utility/YooUtility.cs b/Assets/YooAsset/Runtime/Utility/YooUtility.cs index 6c1132a9..550a6826 100644 --- a/Assets/YooAsset/Runtime/Utility/YooUtility.cs +++ b/Assets/YooAsset/Runtime/Utility/YooUtility.cs @@ -191,7 +191,7 @@ namespace YooAsset /// /// 哈希工具类 /// - internal static class HashUtility + public static class HashUtility { private static string ToString(byte[] hashBytes) { diff --git a/Assets/YooAsset/Samples~/Space Shooter/ThirdParty/StreamingAssetsHelper/StreamingAssetsHelper.cs b/Assets/YooAsset/Samples~/Space Shooter/ThirdParty/StreamingAssetsHelper/StreamingAssetsHelper.cs index ceef92c8..b28793de 100644 --- a/Assets/YooAsset/Samples~/Space Shooter/ThirdParty/StreamingAssetsHelper/StreamingAssetsHelper.cs +++ b/Assets/YooAsset/Samples~/Space Shooter/ThirdParty/StreamingAssetsHelper/StreamingAssetsHelper.cs @@ -31,7 +31,7 @@ public sealed class StreamingAssetsHelper { if (GameQueryServices.CompareFileCRC) { - string crc32 = YooAsset.Editor.EditorTools.GetFileCRC32(filePath); + string crc32 = YooAsset.HashUtility.FileCRC32(filePath); return crc32 == fileCRC; } else @@ -146,7 +146,7 @@ internal class PreprocessBuild : UnityEditor.Build.IPreprocessBuildWithReport BuildinFileManifest.Element element = new BuildinFileManifest.Element(); element.PackageName = fileInfo.Directory.Name; - element.FileCRC32 = YooAsset.Editor.EditorTools.GetFileCRC32(fileInfo.FullName); + element.FileCRC32 = YooAsset.HashUtility.FileCRC32(fileInfo.FullName); element.FileName = fileInfo.Name; manifest.BuildinFiles.Add(element); }