Update PatchSystem

pull/4/head
hevinci 2022-03-23 18:23:01 +08:00
parent 144fe7d398
commit ef8706e3e7
2 changed files with 6 additions and 6 deletions

View File

@ -59,7 +59,7 @@ namespace YooAsset
if (_steps == ESteps.LoadAppManifest) if (_steps == ESteps.LoadAppManifest)
{ {
string filePath = PathHelper.MakeStreamingLoadPath(ResourceSettingData.Setting.PatchManifestFileName); string filePath = PathHelper.MakeStreamingLoadPath(YooAssetSettingsData.Setting.PatchManifestFileName);
_downloadURL = PathHelper.ConvertToWWWPath(filePath); _downloadURL = PathHelper.ConvertToWWWPath(filePath);
_downloader = new UnityWebDataRequester(); _downloader = new UnityWebDataRequester();
_downloader.SendRequest(_downloadURL); _downloader.SendRequest(_downloadURL);
@ -149,7 +149,7 @@ namespace YooAsset
{ {
// 加载APP内的补丁清单 // 加载APP内的补丁清单
YooLogger.Log($"Load application patch manifest."); YooLogger.Log($"Load application patch manifest.");
string filePath = PathHelper.MakeStreamingLoadPath(ResourceSettingData.Setting.PatchManifestFileName); string filePath = PathHelper.MakeStreamingLoadPath(YooAssetSettingsData.Setting.PatchManifestFileName);
_downloadURL = PathHelper.ConvertToWWWPath(filePath); _downloadURL = PathHelper.ConvertToWWWPath(filePath);
_downloader = new UnityWebDataRequester(); _downloader = new UnityWebDataRequester();
_downloader.SendRequest(_downloadURL); _downloader.SendRequest(_downloadURL);
@ -184,7 +184,7 @@ namespace YooAsset
if (SandboxHelper.CheckSandboxPatchManifestFileExist()) if (SandboxHelper.CheckSandboxPatchManifestFileExist())
{ {
YooLogger.Log($"Load sandbox patch manifest."); YooLogger.Log($"Load sandbox patch manifest.");
string filePath = PathHelper.MakePersistentLoadPath(ResourceSettingData.Setting.PatchManifestFileName); string filePath = PathHelper.MakePersistentLoadPath(YooAssetSettingsData.Setting.PatchManifestFileName);
string jsonData = File.ReadAllText(filePath); string jsonData = File.ReadAllText(filePath);
_impl.LocalPatchManifest = PatchManifest.Deserialize(jsonData); _impl.LocalPatchManifest = PatchManifest.Deserialize(jsonData);
} }

View File

@ -95,7 +95,7 @@ namespace YooAsset
if (_steps == ESteps.LoadWebManifestHash) if (_steps == ESteps.LoadWebManifestHash)
{ {
string webURL = GetPatchManifestRequestURL(_updateResourceVersion, ResourceSettingData.Setting.PatchManifestHashFileName); string webURL = GetPatchManifestRequestURL(_updateResourceVersion, YooAssetSettingsData.Setting.PatchManifestHashFileName);
YooLogger.Log($"Beginning to request patch manifest hash : {webURL}"); YooLogger.Log($"Beginning to request patch manifest hash : {webURL}");
_downloaderHash = new UnityWebDataRequester(); _downloaderHash = new UnityWebDataRequester();
_downloaderHash.SendRequest(webURL, _timeout); _downloaderHash.SendRequest(webURL, _timeout);
@ -137,7 +137,7 @@ namespace YooAsset
if (_steps == ESteps.LoadWebManifest) if (_steps == ESteps.LoadWebManifest)
{ {
string webURL = GetPatchManifestRequestURL(_updateResourceVersion, ResourceSettingData.Setting.PatchManifestFileName); string webURL = GetPatchManifestRequestURL(_updateResourceVersion, YooAssetSettingsData.Setting.PatchManifestFileName);
YooLogger.Log($"Beginning to request patch manifest : {webURL}"); YooLogger.Log($"Beginning to request patch manifest : {webURL}");
_downloaderManifest = new UnityWebDataRequester(); _downloaderManifest = new UnityWebDataRequester();
_downloaderManifest.SendRequest(webURL, _timeout); _downloaderManifest.SendRequest(webURL, _timeout);
@ -206,7 +206,7 @@ namespace YooAsset
// 注意:这里会覆盖掉沙盒内的补丁清单文件 // 注意:这里会覆盖掉沙盒内的补丁清单文件
YooLogger.Log("Save remote patch manifest file."); YooLogger.Log("Save remote patch manifest file.");
string savePath = PathHelper.MakePersistentLoadPath(ResourceSettingData.Setting.PatchManifestFileName); string savePath = PathHelper.MakePersistentLoadPath(YooAssetSettingsData.Setting.PatchManifestFileName);
PatchManifest.Serialize(savePath, _impl.LocalPatchManifest); PatchManifest.Serialize(savePath, _impl.LocalPatchManifest);
} }