Update basic sample

pull/51/head
hevinci 2022-11-18 21:35:42 +08:00
parent 49949ecda5
commit 9394ff49fd
3 changed files with 4 additions and 3 deletions

View File

@ -9,7 +9,8 @@ internal class FsmClearCache : IFsmNode
void IFsmNode.OnEnter() void IFsmNode.OnEnter()
{ {
Debug.Log("清理未使用的缓存文件!"); Debug.Log("清理未使用的缓存文件!");
var operation = YooAsset.YooAssets.ClearUnusedCacheFiles(); var package = YooAsset.YooAssets.GetAssetsPackage("DefaultPackage");
var operation = package.ClearPackageUnusedCacheFilesAsync();
operation.Completed += Operation_Completed; operation.Completed += Operation_Completed;
} }

View File

@ -25,7 +25,7 @@ public class FsmUpdateManifest : IFsmNode
// 更新补丁清单 // 更新补丁清单
var package = YooAssets.GetAssetsPackage("DefaultPackage"); var package = YooAssets.GetAssetsPackage("DefaultPackage");
var operation = package.UpdateManifestAsync(PatchUpdater.PackageVersion, 30); var operation = package.UpdatePackageManifestAsync(PatchUpdater.PackageVersion, 30);
yield return operation; yield return operation;
if(operation.Status == EOperationStatus.Succeed) if(operation.Status == EOperationStatus.Succeed)

View File

@ -25,7 +25,7 @@ internal class FsmUpdateStaticVersion : IFsmNode
// 更新资源版本号 // 更新资源版本号
var package = YooAssets.GetAssetsPackage("DefaultPackage"); var package = YooAssets.GetAssetsPackage("DefaultPackage");
var operation = package.UpdateStaticVersionAsync(30); var operation = package.UpdatePackageVersionAsync(30);
yield return operation; yield return operation;
if (operation.Status == EOperationStatus.Succeed) if (operation.Status == EOperationStatus.Succeed)