From a2b51a8044f689ac22574ca35793fb22bac7faf3 Mon Sep 17 00:00:00 2001 From: hevinci Date: Sat, 3 Dec 2022 18:49:05 +0800 Subject: [PATCH] Update samples --- .../Extension Sample/Scripts/Editor/PatchCompareWindow.cs | 8 ++++---- .../Extension Sample/Scripts/Editor/PatchImportWindow.cs | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Assets/YooAsset/Samples~/Extension Sample/Scripts/Editor/PatchCompareWindow.cs b/Assets/YooAsset/Samples~/Extension Sample/Scripts/Editor/PatchCompareWindow.cs index e3c70e8..1e57a90 100644 --- a/Assets/YooAsset/Samples~/Extension Sample/Scripts/Editor/PatchCompareWindow.cs +++ b/Assets/YooAsset/Samples~/Extension Sample/Scripts/Editor/PatchCompareWindow.cs @@ -105,12 +105,12 @@ namespace YooAsset.Editor newList.Clear(); // 加载补丁清单1 - string jsonData1 = FileUtility.ReadFile(_patchManifestPath1); - PatchManifest patchManifest1 = PatchManifest.Deserialize(jsonData1); + byte[] bytesData1 = FileUtility.ReadAllBytes(_patchManifestPath1); + PatchManifest patchManifest1 = PatchManifest.DeserializeFromBinary(bytesData1); // 加载补丁清单1 - string jsonData2 = FileUtility.ReadFile(_patchManifestPath2); - PatchManifest patchManifest2 = PatchManifest.Deserialize(jsonData2); + byte[] bytesData2 = FileUtility.ReadAllBytes(_patchManifestPath2); + PatchManifest patchManifest2 = PatchManifest.DeserializeFromBinary(bytesData2); // 拷贝文件列表 foreach (var patchBundle2 in patchManifest2.BundleList) diff --git a/Assets/YooAsset/Samples~/Extension Sample/Scripts/Editor/PatchImportWindow.cs b/Assets/YooAsset/Samples~/Extension Sample/Scripts/Editor/PatchImportWindow.cs index c9d166b..332dce4 100644 --- a/Assets/YooAsset/Samples~/Extension Sample/Scripts/Editor/PatchImportWindow.cs +++ b/Assets/YooAsset/Samples~/Extension Sample/Scripts/Editor/PatchImportWindow.cs @@ -51,8 +51,8 @@ namespace YooAsset.Editor string outputDirectory = Path.GetDirectoryName(patchManifestFilePath); // 加载补丁清单 - string jsonData = FileUtility.ReadFile(patchManifestFilePath); - PatchManifest patchManifest = PatchManifest.Deserialize(jsonData); + byte[] bytesData = FileUtility.ReadAllBytes(patchManifestFilePath); + PatchManifest patchManifest = PatchManifest.DeserializeFromBinary(bytesData); // 拷贝核心文件 {