parent
475efd90fc
commit
ea9b8874cc
|
@ -117,7 +117,11 @@ namespace YooAsset
|
||||||
if (AssetSystem.DecryptionServices == null)
|
if (AssetSystem.DecryptionServices == null)
|
||||||
throw new Exception($"{nameof(AssetBundleFileLoader)} need {nameof(IDecryptionServices)} : {MainBundleInfo.BundleName}");
|
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)
|
if (_isWaitForAsyncComplete)
|
||||||
CacheBundle = AssetBundle.LoadFromFile(_fileLoadPath, 0, offset);
|
CacheBundle = AssetBundle.LoadFromFile(_fileLoadPath, 0, offset);
|
||||||
else
|
else
|
||||||
|
|
|
@ -1,11 +1,18 @@
|
||||||
|
|
||||||
namespace YooAsset
|
namespace YooAsset
|
||||||
{
|
{
|
||||||
|
public struct DecryptionFileInfo
|
||||||
|
{
|
||||||
|
public string BundleName;
|
||||||
|
public string BundleHash;
|
||||||
|
public string BundleCRC;
|
||||||
|
}
|
||||||
|
|
||||||
public interface IDecryptionServices
|
public interface IDecryptionServices
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取加密文件的数据偏移量
|
/// 获取加密文件的数据偏移量
|
||||||
/// </summary>
|
/// </summary>
|
||||||
ulong GetFileOffset();
|
ulong GetFileOffset(DecryptionFileInfo fileInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue