Closed hj9944 closed 2 weeks ago
引擎底层加载AB文件失败了。是不是对AB做过加密处理?
使用的dev源码offset模式, 会出现上面错误, 改成none正常了
yooasset版本多少?我验证一下
你看下你的解密类 和 加密类是否一致
拉的dev分支, 可以选sbp, 加密方式offset, 案例里面必现, demo未做任何处理
拉的dev分支, 可以选sbp, 加密方式offset, 案例里面必现, demo未做任何处理
好。我修复一下
构建的时候选择Offset加密方法,运行时解密没有报错。
// 单机运行模式
if (playMode == EPlayMode.OfflinePlayMode)
{
FileOffsetDecryption decryption = new FileOffsetDecryption();
var createParameters = new OfflinePlayModeParameters();
createParameters.BuildinFileSystemParameters = FileSystemParameters.CreateDefaultBuildinFileSystemParameters(decryption);
initializationOperation = package.InitializeAsync(createParameters);
}
主要是加密方法和解密方法对应上就可以。先关闭该问题,如果还有复现可以重启
dev分支
Unable to read header from archive file: Failed to read data for the AssetBundle 'IO.Stream'. Failed to load assetBundle : assets_yooasset_samples_space_shooter_gameres_audio.bundle UnityEngine.StackTraceUtility:ExtractStackTrace () UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[]) UnityEngine.Logger:Log (UnityEngine.LogType,object) UnityEngine.Debug:LogError (object) YooAsset.YooLogger:Error (string) (at Assets/YooAsset/Runtime/Utility/YooLogger.cs:62) YooAsset.AssetBundleFileLoader:Update () (at Assets/YooAsset/Runtime/ResourceManager/Loader/AssetBundleFileLoader.cs:214) YooAsset.ResourceManager:Update () (at Assets/YooAsset/Runtime/ResourceManager/ResourceManager.cs:52) YooAsset.ResourcePackage:UpdatePackage () (at Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs:53) YooAsset.YooAssets:Update () (at Assets/YooAsset/Runtime/YooAssets.cs:88) YooAsset.YooAssetsDriver:Update () (at Assets/YooAsset/Runtime/YooAssetsDriver.cs:13)