Update runtime code

This commit is contained in:
hevinci
2022-09-29 18:40:43 +08:00
parent 46c219505f
commit a71921cdd1
36 changed files with 844 additions and 1625 deletions
@@ -26,7 +26,7 @@ namespace YooAsset
private AssetBundleCreateRequest _createRequest;
public AssetBundleFileLoader(BundleInfo bundleInfo) : base(bundleInfo)
public AssetBundleFileLoader(AssetSystemImpl impl, BundleInfo bundleInfo) : base(impl, bundleInfo)
{
}
@@ -105,13 +105,13 @@ namespace YooAsset
// Load assetBundle file
if (MainBundleInfo.Bundle.IsEncrypted)
{
if (AssetSystem.DecryptionServices == null)
if (Impl.DecryptionServices == null)
throw new Exception($"{nameof(AssetBundleFileLoader)} need {nameof(IDecryptionServices)} : {MainBundleInfo.Bundle.BundleName}");
DecryptionFileInfo fileInfo = new DecryptionFileInfo();
fileInfo.BundleName = MainBundleInfo.Bundle.BundleName;
fileInfo.FileHash = MainBundleInfo.Bundle.FileHash;
ulong offset = AssetSystem.DecryptionServices.GetFileOffset(fileInfo);
ulong offset = Impl.DecryptionServices.GetFileOffset(fileInfo);
if (_isWaitForAsyncComplete)
CacheBundle = AssetBundle.LoadFromFile(_fileLoadPath, 0, offset);
else