diff --git a/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/PatchLogic/FsmNode/FsmClearCache.cs b/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/PatchLogic/FsmNode/FsmClearCache.cs index 3e0af38..efe8263 100644 --- a/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/PatchLogic/FsmNode/FsmClearCache.cs +++ b/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/PatchLogic/FsmNode/FsmClearCache.cs @@ -17,7 +17,7 @@ internal class FsmClearCache : IStateNode void IStateNode.OnEnter() { PatchEventDefine.PatchStatesChange.SendEventMessage("清理未使用的缓存文件!"); - var package = YooAsset.YooAssets.GetAssetsPackage("DefaultPackage"); + var package = YooAsset.YooAssets.GetPackage("DefaultPackage"); var operation = package.ClearUnusedCacheFilesAsync(); operation.Completed += Operation_Completed; } diff --git a/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/PatchLogic/FsmNode/FsmCreateDownloader.cs b/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/PatchLogic/FsmNode/FsmCreateDownloader.cs index e658890..c05ceaf 100644 --- a/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/PatchLogic/FsmNode/FsmCreateDownloader.cs +++ b/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/PatchLogic/FsmNode/FsmCreateDownloader.cs @@ -34,7 +34,7 @@ public class FsmCreateDownloader : IStateNode int downloadingMaxNum = 10; int failedTryAgain = 3; - var downloader = YooAssets.CreatePatchDownloader(downloadingMaxNum, failedTryAgain); + var downloader = YooAssets.CreateResourceDownloader(downloadingMaxNum, failedTryAgain); PatchManager.Instance.Downloader = downloader; if (downloader.TotalDownloadCount == 0) diff --git a/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/PatchLogic/FsmNode/FsmInitialize.cs b/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/PatchLogic/FsmNode/FsmInitialize.cs index 719328c..1bf614d 100644 --- a/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/PatchLogic/FsmNode/FsmInitialize.cs +++ b/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/PatchLogic/FsmNode/FsmInitialize.cs @@ -38,11 +38,11 @@ internal class FsmInitialize : IStateNode // 创建默认的资源包 string packageName = "DefaultPackage"; - var package = YooAssets.TryGetAssetsPackage(packageName); + var package = YooAssets.TryGetPackage(packageName); if (package == null) { - package = YooAssets.CreateAssetsPackage(packageName); - YooAssets.SetDefaultAssetsPackage(package); + package = YooAssets.CreatePackage(packageName); + YooAssets.SetDefaultPackage(package); } // 编辑器下的模拟模式 @@ -50,7 +50,7 @@ internal class FsmInitialize : IStateNode if (playMode == EPlayMode.EditorSimulateMode) { var createParameters = new EditorSimulateModeParameters(); - createParameters.SimulatePatchManifestPath = EditorSimulateModeHelper.SimulateBuild(packageName); + createParameters.SimulateManifestFilePath = EditorSimulateModeHelper.SimulateBuild(packageName); initializationOperation = package.InitializeAsync(createParameters); } 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 420ba04..72841f0 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 @@ -32,7 +32,7 @@ public class FsmUpdateManifest : IStateNode { yield return new WaitForSecondsRealtime(0.5f); - var package = YooAssets.GetAssetsPackage("DefaultPackage"); + var package = YooAssets.GetPackage("DefaultPackage"); var operation = package.UpdatePackageManifestAsync(PatchManager.Instance.PackageVersion); yield return operation; 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 2275b4a..08e6eb9 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 @@ -32,7 +32,7 @@ internal class FsmUpdateVersion : IStateNode { yield return new WaitForSecondsRealtime(0.5f); - var package = YooAssets.GetAssetsPackage("DefaultPackage"); + var package = YooAssets.GetPackage("DefaultPackage"); var operation = package.UpdatePackageVersionAsync(); yield return operation; diff --git a/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/PatchLogic/PatchManager.cs b/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/PatchLogic/PatchManager.cs index 33ccdd6..3197da7 100644 --- a/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/PatchLogic/PatchManager.cs +++ b/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/PatchLogic/PatchManager.cs @@ -22,7 +22,7 @@ public class PatchManager : ModuleSingleton, IModule /// /// 下载器 /// - public PatchDownloaderOperation Downloader { set; get; } + public ResourceDownloaderOperation Downloader { set; get; } private bool _isRun = false; diff --git a/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/UIWindow/UIHomeWindow.cs b/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/UIWindow/UIHomeWindow.cs index 4867188..2490f89 100644 --- a/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/UIWindow/UIHomeWindow.cs +++ b/Assets/YooAsset/Samples~/Space Shooter/GameScript/Runtime/UIWindow/UIHomeWindow.cs @@ -24,7 +24,7 @@ public class UIHomeWindow : UIWindow } public override void OnRefresh() { - var package = YooAsset.YooAssets.GetAssetsPackage("DefaultPackage"); + var package = YooAsset.YooAssets.GetPackage("DefaultPackage"); _version.text = "Ver : " + package.GetPackageVersion(); } public override void OnUpdate()