Update logic code

优化补丁清单格式为二进制。
This commit is contained in:
hevinci
2022-12-03 18:48:51 +08:00
parent 7aab610be5
commit 19cb239746
14 changed files with 193 additions and 62 deletions
@@ -105,7 +105,7 @@ namespace YooAsset
if (_steps == ESteps.LoadWebManifest)
{
string fileName = YooAssetSettingsData.GetPatchManifestFileName(_packageName, _packageVersion);
string fileName = YooAssetSettingsData.GetPatchManifestBinaryFileName(_packageName, _packageVersion);
string webURL = GetPatchManifestRequestURL(fileName);
YooLogger.Log($"Beginning to request patch manifest : {webURL}");
_downloader = new UnityWebDataRequester();
@@ -131,7 +131,8 @@ namespace YooAsset
// 解析补丁清单
try
{
_remotePatchManifest = PatchManifest.Deserialize(_downloader.GetText());
byte[] bytesData = _downloader.GetData();
_remotePatchManifest = PatchManifest.DeserializeFromBinary(bytesData);
_steps = ESteps.Done;
Status = EOperationStatus.Succeed;
}