diff --git a/Assets/YooAsset/Runtime/AssetSystem/Loader/AssetBundleFileLoader.cs b/Assets/YooAsset/Runtime/AssetSystem/Loader/AssetBundleFileLoader.cs index da08447..c212eab 100644 --- a/Assets/YooAsset/Runtime/AssetSystem/Loader/AssetBundleFileLoader.cs +++ b/Assets/YooAsset/Runtime/AssetSystem/Loader/AssetBundleFileLoader.cs @@ -117,7 +117,11 @@ namespace YooAsset if (AssetSystem.DecryptionServices == null) throw new Exception($"{nameof(AssetBundleFileLoader)} need {nameof(IDecryptionServices)} : {MainBundleInfo.BundleName}"); - ulong offset = AssetSystem.DecryptionServices.GetFileOffset(); + DecryptionFileInfo fileInfo = new DecryptionFileInfo(); + fileInfo.BundleName = MainBundleInfo.BundleName; + fileInfo.BundleHash = MainBundleInfo.Hash; + fileInfo.BundleCRC = MainBundleInfo.CRC; + ulong offset = AssetSystem.DecryptionServices.GetFileOffset(fileInfo); if (_isWaitForAsyncComplete) CacheBundle = AssetBundle.LoadFromFile(_fileLoadPath, 0, offset); else diff --git a/Assets/YooAsset/Runtime/Services/IDecryptionServices.cs b/Assets/YooAsset/Runtime/Services/IDecryptionServices.cs index 47ff2bd..f037954 100644 --- a/Assets/YooAsset/Runtime/Services/IDecryptionServices.cs +++ b/Assets/YooAsset/Runtime/Services/IDecryptionServices.cs @@ -1,11 +1,18 @@  namespace YooAsset { + public struct DecryptionFileInfo + { + public string BundleName; + public string BundleHash; + public string BundleCRC; + } + public interface IDecryptionServices { /// /// 获取加密文件的数据偏移量 /// - ulong GetFileOffset(); + ulong GetFileOffset(DecryptionFileInfo fileInfo); } } \ No newline at end of file