diff --git a/Assets/YooAsset/Runtime/PatchSystem/Operations/UpdateManifestOperation.cs b/Assets/YooAsset/Runtime/PatchSystem/Operations/UpdateManifestOperation.cs index 45773ab..32a8127 100644 --- a/Assets/YooAsset/Runtime/PatchSystem/Operations/UpdateManifestOperation.cs +++ b/Assets/YooAsset/Runtime/PatchSystem/Operations/UpdateManifestOperation.cs @@ -113,6 +113,7 @@ namespace YooAsset if (cachedManifestHash == webManifestHash) { YooLogger.Log($"Patch manifest file hash is not change : {webManifestHash}"); + LoadSandboxPatchManifest(_updateResourceVersion); _steps = ESteps.InitPrepareCache; } else @@ -140,7 +141,7 @@ namespace YooAsset // Check error if (_downloaderManifest.HasError()) - { + { _steps = ESteps.Done; Status = EOperationStatus.Failed; Error = _downloaderManifest.GetError(); @@ -211,6 +212,17 @@ namespace YooAsset } } + /// + /// 加载沙盒内的补丁清单 + /// + private void LoadSandboxPatchManifest(int updateResourceVersion) + { + YooLogger.Log("Load sandbox patch manifest file."); + string filePath = PathHelper.MakePersistentLoadPath(YooAssetSettingsData.GetPatchManifestFileName(updateResourceVersion)); + string jsonData = File.ReadAllText(filePath); + _impl.LocalPatchManifest = PatchManifest.Deserialize(jsonData); + } + /// /// 获取沙盒内补丁清单文件的哈希值 /// 注意:如果沙盒内补丁清单文件不存在,返回空字符串