From 08ad68d4a2f82be4c2330716ef67a723940b2a32 Mon Sep 17 00:00:00 2001 From: hevinci Date: Sat, 17 Dec 2022 22:38:26 +0800 Subject: [PATCH] update samples --- .../YooAsset/Samples~/Space Shooter/GameScript/Runtime/Boot.cs | 1 + .../GameScript/Runtime/PatchLogic/FsmNode/FsmUpdateManifest.cs | 2 +- .../GameScript/Runtime/PatchLogic/FsmNode/FsmUpdateVersion.cs | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/Boot.cs b/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/Boot.cs index 0bb9d32..31b878a 100644 --- a/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/Boot.cs +++ b/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/Boot.cs @@ -29,6 +29,7 @@ public class Boot : MonoBehaviour // 初始化资源系统 YooAssets.Initialize(); + YooAssets.SetOperationSystemMaxTimeSlice(30); // 创建补丁管理器 UniModule.CreateModule(); diff --git a/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/PatchLogic/FsmNode/FsmUpdateManifest.cs b/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/PatchLogic/FsmNode/FsmUpdateManifest.cs index 8b221a7..420ba04 100644 --- a/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/PatchLogic/FsmNode/FsmUpdateManifest.cs +++ b/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/PatchLogic/FsmNode/FsmUpdateManifest.cs @@ -33,7 +33,7 @@ public class FsmUpdateManifest : IStateNode yield return new WaitForSecondsRealtime(0.5f); var package = YooAssets.GetAssetsPackage("DefaultPackage"); - var operation = package.UpdatePackageManifestAsync(PatchManager.Instance.PackageVersion, 30); + var operation = package.UpdatePackageManifestAsync(PatchManager.Instance.PackageVersion); yield return operation; if(operation.Status == EOperationStatus.Succeed) diff --git a/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/PatchLogic/FsmNode/FsmUpdateVersion.cs b/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/PatchLogic/FsmNode/FsmUpdateVersion.cs index 8fbb7e3..2275b4a 100644 --- a/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/PatchLogic/FsmNode/FsmUpdateVersion.cs +++ b/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/PatchLogic/FsmNode/FsmUpdateVersion.cs @@ -33,7 +33,7 @@ internal class FsmUpdateVersion : IStateNode yield return new WaitForSecondsRealtime(0.5f); var package = YooAssets.GetAssetsPackage("DefaultPackage"); - var operation = package.UpdatePackageVersionAsync(30); + var operation = package.UpdatePackageVersionAsync(); yield return operation; if (operation.Status == EOperationStatus.Succeed)