From 9394ff49fda712cbfce803bc426e3b2374315e53 Mon Sep 17 00:00:00 2001 From: hevinci Date: Fri, 18 Nov 2022 21:35:42 +0800 Subject: [PATCH] Update basic sample --- .../GameScript/Runtime/PatchUpdater/FsmNode/FsmClearCache.cs | 3 ++- .../Runtime/PatchUpdater/FsmNode/FsmUpdateManifest.cs | 2 +- .../Runtime/PatchUpdater/FsmNode/FsmUpdateStaticVersion.cs | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Assets/YooAsset/Samples~/Basic Sample/GameScript/Runtime/PatchUpdater/FsmNode/FsmClearCache.cs b/Assets/YooAsset/Samples~/Basic Sample/GameScript/Runtime/PatchUpdater/FsmNode/FsmClearCache.cs index 6b4fb22..011b4f3 100644 --- a/Assets/YooAsset/Samples~/Basic Sample/GameScript/Runtime/PatchUpdater/FsmNode/FsmClearCache.cs +++ b/Assets/YooAsset/Samples~/Basic Sample/GameScript/Runtime/PatchUpdater/FsmNode/FsmClearCache.cs @@ -9,7 +9,8 @@ internal class FsmClearCache : IFsmNode void IFsmNode.OnEnter() { Debug.Log("清理未使用的缓存文件!"); - var operation = YooAsset.YooAssets.ClearUnusedCacheFiles(); + var package = YooAsset.YooAssets.GetAssetsPackage("DefaultPackage"); + var operation = package.ClearPackageUnusedCacheFilesAsync(); operation.Completed += Operation_Completed; } diff --git a/Assets/YooAsset/Samples~/Basic Sample/GameScript/Runtime/PatchUpdater/FsmNode/FsmUpdateManifest.cs b/Assets/YooAsset/Samples~/Basic Sample/GameScript/Runtime/PatchUpdater/FsmNode/FsmUpdateManifest.cs index e1901a7..1ec8e1f 100644 --- a/Assets/YooAsset/Samples~/Basic Sample/GameScript/Runtime/PatchUpdater/FsmNode/FsmUpdateManifest.cs +++ b/Assets/YooAsset/Samples~/Basic Sample/GameScript/Runtime/PatchUpdater/FsmNode/FsmUpdateManifest.cs @@ -25,7 +25,7 @@ public class FsmUpdateManifest : IFsmNode // 更新补丁清单 var package = YooAssets.GetAssetsPackage("DefaultPackage"); - var operation = package.UpdateManifestAsync(PatchUpdater.PackageVersion, 30); + var operation = package.UpdatePackageManifestAsync(PatchUpdater.PackageVersion, 30); yield return operation; if(operation.Status == EOperationStatus.Succeed) diff --git a/Assets/YooAsset/Samples~/Basic Sample/GameScript/Runtime/PatchUpdater/FsmNode/FsmUpdateStaticVersion.cs b/Assets/YooAsset/Samples~/Basic Sample/GameScript/Runtime/PatchUpdater/FsmNode/FsmUpdateStaticVersion.cs index 170ee51..14e8b7e 100644 --- a/Assets/YooAsset/Samples~/Basic Sample/GameScript/Runtime/PatchUpdater/FsmNode/FsmUpdateStaticVersion.cs +++ b/Assets/YooAsset/Samples~/Basic Sample/GameScript/Runtime/PatchUpdater/FsmNode/FsmUpdateStaticVersion.cs @@ -25,7 +25,7 @@ internal class FsmUpdateStaticVersion : IFsmNode // 更新资源版本号 var package = YooAssets.GetAssetsPackage("DefaultPackage"); - var operation = package.UpdateStaticVersionAsync(30); + var operation = package.UpdatePackageVersionAsync(30); yield return operation; if (operation.Status == EOperationStatus.Succeed)