mirror of https://github.com/tuyoogame/YooAsset
Fixed a process error raised after the additional version of the patch manifest
修复资源清单附加版本之后引发的一个流程错误。pull/4/head
parent
4591d0b5f6
commit
abb75fe858
|
@ -113,6 +113,7 @@ namespace YooAsset
|
||||||
if (cachedManifestHash == webManifestHash)
|
if (cachedManifestHash == webManifestHash)
|
||||||
{
|
{
|
||||||
YooLogger.Log($"Patch manifest file hash is not change : {webManifestHash}");
|
YooLogger.Log($"Patch manifest file hash is not change : {webManifestHash}");
|
||||||
|
LoadSandboxPatchManifest(_updateResourceVersion);
|
||||||
_steps = ESteps.InitPrepareCache;
|
_steps = ESteps.InitPrepareCache;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -140,7 +141,7 @@ namespace YooAsset
|
||||||
|
|
||||||
// Check error
|
// Check error
|
||||||
if (_downloaderManifest.HasError())
|
if (_downloaderManifest.HasError())
|
||||||
{
|
{
|
||||||
_steps = ESteps.Done;
|
_steps = ESteps.Done;
|
||||||
Status = EOperationStatus.Failed;
|
Status = EOperationStatus.Failed;
|
||||||
Error = _downloaderManifest.GetError();
|
Error = _downloaderManifest.GetError();
|
||||||
|
@ -211,6 +212,17 @@ namespace YooAsset
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 加载沙盒内的补丁清单
|
||||||
|
/// </summary>
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取沙盒内补丁清单文件的哈希值
|
/// 获取沙盒内补丁清单文件的哈希值
|
||||||
/// 注意:如果沙盒内补丁清单文件不存在,返回空字符串
|
/// 注意:如果沙盒内补丁清单文件不存在,返回空字符串
|
||||||
|
|
Loading…
Reference in New Issue