mirror of
https://github.com/tuyoogame/YooAsset.git
synced 2026-05-14 19:40:47 +00:00
Update decryption services
解密服务接口增加解密文件信息。
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -1,11 +1,18 @@
|
||||
|
||||
namespace YooAsset
|
||||
{
|
||||
public struct DecryptionFileInfo
|
||||
{
|
||||
public string BundleName;
|
||||
public string BundleHash;
|
||||
public string BundleCRC;
|
||||
}
|
||||
|
||||
public interface IDecryptionServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取加密文件的数据偏移量
|
||||
/// </summary>
|
||||
ulong GetFileOffset();
|
||||
ulong GetFileOffset(DecryptionFileInfo fileInfo);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user