From 5d9ef12577838d44a9ffcc6dcaced895c30b9e61 Mon Sep 17 00:00:00 2001 From: hevinci Date: Tue, 10 Oct 2023 12:17:01 +0800 Subject: [PATCH] update operation system --- .../Operation/ClearAllCacheFilesOperation.cs | 4 +-- .../ClearUnusedCacheFilesOperation.cs | 4 +-- .../Internal/FindCacheFilesOperation.cs | 4 +-- .../Internal/VerifyCacheFilesOperation.cs | 8 +++--- .../Internal/VerifyTempFileOperation.cs | 8 +++--- .../Operation/PackageCachingOperation.cs | 4 +-- .../Downloader/FileDownloader.cs | 2 +- .../OperationSystem/AsyncOperationBase.cs | 28 +++++++++---------- .../OperationSystem/GameAsyncOperation.cs | 13 +++++++-- .../OperationSystem/OperationSystem.cs | 2 +- .../Operation/InstantiateOperation.cs | 6 ++-- .../Operation/UnloadSceneOperation.cs | 4 +-- .../Operation/DownloaderOperation.cs | 4 +-- .../Operation/InitializationOperation.cs | 16 +++++------ .../Internal/DeserializeManifestOperation.cs | 4 +-- .../Internal/DownloadManifestOperation.cs | 4 +-- .../Internal/LoadBuildinManifestOperation.cs | 4 +-- .../Internal/LoadCacheManifestOperation.cs | 4 +-- .../Internal/LoadEditorManifestOperation.cs | 4 +-- .../Internal/LoadRemoteManifestOperation.cs | 4 +-- .../QueryBuildinPackageVersionOperation.cs | 4 +-- .../QueryCachePackageHashOperation.cs | 4 +-- .../QueryCachePackageVersionOperation.cs | 4 +-- .../QueryRemotePackageHashOperation.cs | 4 +-- .../QueryRemotePackageVersionOperation.cs | 4 +-- .../UnpackBuildinManifestOperation.cs | 4 +-- .../Operation/PreDownloadContentOperation.cs | 16 +++++------ .../UpdatePackageManifestOperation.cs | 16 +++++------ .../UpdatePackageVersionOperation.cs | 16 +++++------ 29 files changed, 106 insertions(+), 97 deletions(-) diff --git a/Assets/YooAsset/Runtime/CacheSystem/Operation/ClearAllCacheFilesOperation.cs b/Assets/YooAsset/Runtime/CacheSystem/Operation/ClearAllCacheFilesOperation.cs index b0a2176..9f3068a 100644 --- a/Assets/YooAsset/Runtime/CacheSystem/Operation/ClearAllCacheFilesOperation.cs +++ b/Assets/YooAsset/Runtime/CacheSystem/Operation/ClearAllCacheFilesOperation.cs @@ -26,11 +26,11 @@ namespace YooAsset { _cache = cache; } - internal override void Start() + internal override void InternalOnStart() { _steps = ESteps.GetAllCacheFiles; } - internal override void Update() + internal override void InternalOnUpdate() { if (_steps == ESteps.None || _steps == ESteps.Done) return; diff --git a/Assets/YooAsset/Runtime/CacheSystem/Operation/ClearUnusedCacheFilesOperation.cs b/Assets/YooAsset/Runtime/CacheSystem/Operation/ClearUnusedCacheFilesOperation.cs index d53e812..1df9d20 100644 --- a/Assets/YooAsset/Runtime/CacheSystem/Operation/ClearUnusedCacheFilesOperation.cs +++ b/Assets/YooAsset/Runtime/CacheSystem/Operation/ClearUnusedCacheFilesOperation.cs @@ -28,11 +28,11 @@ namespace YooAsset _package = package; _cache = cache; } - internal override void Start() + internal override void InternalOnStart() { _steps = ESteps.GetUnusedCacheFiles; } - internal override void Update() + internal override void InternalOnUpdate() { if (_steps == ESteps.None || _steps == ESteps.Done) return; diff --git a/Assets/YooAsset/Runtime/CacheSystem/Operation/Internal/FindCacheFilesOperation.cs b/Assets/YooAsset/Runtime/CacheSystem/Operation/Internal/FindCacheFilesOperation.cs index 355456a..03223e9 100644 --- a/Assets/YooAsset/Runtime/CacheSystem/Operation/Internal/FindCacheFilesOperation.cs +++ b/Assets/YooAsset/Runtime/CacheSystem/Operation/Internal/FindCacheFilesOperation.cs @@ -31,12 +31,12 @@ namespace YooAsset _persistent = persistent; _cache = cache; } - internal override void Start() + internal override void InternalOnStart() { _steps = ESteps.Prepare; _verifyStartTime = UnityEngine.Time.realtimeSinceStartup; } - internal override void Update() + internal override void InternalOnUpdate() { if (_steps == ESteps.None || _steps == ESteps.Done) return; diff --git a/Assets/YooAsset/Runtime/CacheSystem/Operation/Internal/VerifyCacheFilesOperation.cs b/Assets/YooAsset/Runtime/CacheSystem/Operation/Internal/VerifyCacheFilesOperation.cs index 673d211..56e9289 100644 --- a/Assets/YooAsset/Runtime/CacheSystem/Operation/Internal/VerifyCacheFilesOperation.cs +++ b/Assets/YooAsset/Runtime/CacheSystem/Operation/Internal/VerifyCacheFilesOperation.cs @@ -48,12 +48,12 @@ namespace YooAsset _cache = cache; _waitingList = elements; } - internal override void Start() + internal override void InternalOnStart() { _steps = ESteps.InitVerify; _verifyStartTime = UnityEngine.Time.realtimeSinceStartup; } - internal override void Update() + internal override void InternalOnUpdate() { if (_steps == ESteps.None || _steps == ESteps.Done) return; @@ -175,12 +175,12 @@ namespace YooAsset _cache = cache; _waitingList = elements; } - internal override void Start() + internal override void InternalOnStart() { _steps = ESteps.InitVerify; _verifyStartTime = UnityEngine.Time.realtimeSinceStartup; } - internal override void Update() + internal override void InternalOnUpdate() { if (_steps == ESteps.None || _steps == ESteps.Done) return; diff --git a/Assets/YooAsset/Runtime/CacheSystem/Operation/Internal/VerifyTempFileOperation.cs b/Assets/YooAsset/Runtime/CacheSystem/Operation/Internal/VerifyTempFileOperation.cs index 20e3c29..3ae558a 100644 --- a/Assets/YooAsset/Runtime/CacheSystem/Operation/Internal/VerifyTempFileOperation.cs +++ b/Assets/YooAsset/Runtime/CacheSystem/Operation/Internal/VerifyTempFileOperation.cs @@ -41,11 +41,11 @@ namespace YooAsset { _element = element; } - internal override void Start() + internal override void InternalOnStart() { _steps = ESteps.VerifyFile; } - internal override void Update() + internal override void InternalOnUpdate() { if (_steps == ESteps.None || _steps == ESteps.Done) return; @@ -110,11 +110,11 @@ namespace YooAsset { _element = element; } - internal override void Start() + internal override void InternalOnStart() { _steps = ESteps.VerifyFile; } - internal override void Update() + internal override void InternalOnUpdate() { if (_steps == ESteps.None || _steps == ESteps.Done) return; diff --git a/Assets/YooAsset/Runtime/CacheSystem/Operation/PackageCachingOperation.cs b/Assets/YooAsset/Runtime/CacheSystem/Operation/PackageCachingOperation.cs index 40bf5d9..ad867a0 100644 --- a/Assets/YooAsset/Runtime/CacheSystem/Operation/PackageCachingOperation.cs +++ b/Assets/YooAsset/Runtime/CacheSystem/Operation/PackageCachingOperation.cs @@ -26,11 +26,11 @@ namespace YooAsset _persistent = persistent; _cache = cache; } - internal override void Start() + internal override void InternalOnStart() { _steps = ESteps.FindCacheFiles; } - internal override void Update() + internal override void InternalOnUpdate() { if (_steps == ESteps.None || _steps == ESteps.Done) return; diff --git a/Assets/YooAsset/Runtime/DownloadSystem/Downloader/FileDownloader.cs b/Assets/YooAsset/Runtime/DownloadSystem/Downloader/FileDownloader.cs index e4320f1..f34338f 100644 --- a/Assets/YooAsset/Runtime/DownloadSystem/Downloader/FileDownloader.cs +++ b/Assets/YooAsset/Runtime/DownloadSystem/Downloader/FileDownloader.cs @@ -112,7 +112,7 @@ namespace YooAsset if (_steps == ESteps.WaitingVerifyTempFile) { if (WaitForAsyncComplete) - _verifyFileOp.Update(); + _verifyFileOp.InternalOnUpdate(); if (_verifyFileOp.IsDone == false) return; diff --git a/Assets/YooAsset/Runtime/OperationSystem/AsyncOperationBase.cs b/Assets/YooAsset/Runtime/OperationSystem/AsyncOperationBase.cs index 75fe28b..f0f8fee 100644 --- a/Assets/YooAsset/Runtime/OperationSystem/AsyncOperationBase.cs +++ b/Assets/YooAsset/Runtime/OperationSystem/AsyncOperationBase.cs @@ -76,23 +76,18 @@ namespace YooAsset } } - internal abstract void Start(); - internal abstract void Update(); - internal virtual void Abort() { } + internal abstract void InternalOnStart(); + internal abstract void InternalOnUpdate(); + internal virtual void InternalOnAbort() { } internal void SetPackageName(string packageName) { PackageName = packageName; } - internal void SetAbort() + internal void SetStart() { - if (IsDone == false) - { - Status = EOperationStatus.Failed; - Error = "user abort"; - YooLogger.Warning($"Async operaiton has been abort : {this.GetType().Name}"); - Abort(); - } + Status = EOperationStatus.Processing; + InternalOnStart(); } internal void SetFinish() { @@ -101,10 +96,15 @@ namespace YooAsset if (_taskCompletionSource != null) _taskCompletionSource.TrySetResult(null); } - internal void SetStart() + internal void SetAbort() { - Status = EOperationStatus.Processing; - Start(); + if (IsDone == false) + { + Status = EOperationStatus.Failed; + Error = "user abort"; + YooLogger.Warning($"Async operaiton has been abort : {this.GetType().Name}"); + InternalOnAbort(); + } } /// diff --git a/Assets/YooAsset/Runtime/OperationSystem/GameAsyncOperation.cs b/Assets/YooAsset/Runtime/OperationSystem/GameAsyncOperation.cs index e236e99..0ff31fe 100644 --- a/Assets/YooAsset/Runtime/OperationSystem/GameAsyncOperation.cs +++ b/Assets/YooAsset/Runtime/OperationSystem/GameAsyncOperation.cs @@ -3,14 +3,18 @@ namespace YooAsset { public abstract class GameAsyncOperation : AsyncOperationBase { - internal override void Start() + internal override void InternalOnStart() { OnStart(); } - internal override void Update() + internal override void InternalOnUpdate() { OnUpdate(); } + internal override void InternalOnAbort() + { + OnAbort(); + } /// /// 异步操作开始 @@ -22,6 +26,11 @@ namespace YooAsset /// protected abstract void OnUpdate(); + /// + /// 异步操作终止 + /// + protected abstract void OnAbort(); + /// /// 异步操作系统是否繁忙 /// diff --git a/Assets/YooAsset/Runtime/OperationSystem/OperationSystem.cs b/Assets/YooAsset/Runtime/OperationSystem/OperationSystem.cs index f80c6ea..3a3df1f 100644 --- a/Assets/YooAsset/Runtime/OperationSystem/OperationSystem.cs +++ b/Assets/YooAsset/Runtime/OperationSystem/OperationSystem.cs @@ -60,7 +60,7 @@ namespace YooAsset var operation = _operations[i]; if (operation.IsDone == false) - operation.Update(); + operation.InternalOnUpdate(); if (operation.IsDone) { diff --git a/Assets/YooAsset/Runtime/ResourceManager/Operation/InstantiateOperation.cs b/Assets/YooAsset/Runtime/ResourceManager/Operation/InstantiateOperation.cs index 7587647..4c6f909 100644 --- a/Assets/YooAsset/Runtime/ResourceManager/Operation/InstantiateOperation.cs +++ b/Assets/YooAsset/Runtime/ResourceManager/Operation/InstantiateOperation.cs @@ -34,11 +34,11 @@ namespace YooAsset _parent = parent; _worldPositionStays = worldPositionStays; } - internal override void Start() + internal override void InternalOnStart() { _steps = ESteps.Clone; } - internal override void Update() + internal override void InternalOnUpdate() { if (_steps == ESteps.None || _steps == ESteps.Done) return; @@ -93,7 +93,7 @@ namespace YooAsset if (_steps == ESteps.Done) return; _handle.WaitForAsyncComplete(); - Update(); + InternalOnUpdate(); } internal static GameObject InstantiateInternal(UnityEngine.Object assetObject, bool setPositionAndRotation, Vector3 position, Quaternion rotation, Transform parent, bool worldPositionStays) diff --git a/Assets/YooAsset/Runtime/ResourceManager/Operation/UnloadSceneOperation.cs b/Assets/YooAsset/Runtime/ResourceManager/Operation/UnloadSceneOperation.cs index 272382d..5430619 100644 --- a/Assets/YooAsset/Runtime/ResourceManager/Operation/UnloadSceneOperation.cs +++ b/Assets/YooAsset/Runtime/ResourceManager/Operation/UnloadSceneOperation.cs @@ -36,7 +36,7 @@ namespace YooAsset _flag = EFlag.Normal; _scene = scene; } - internal override void Start() + internal override void InternalOnStart() { if (_flag == EFlag.Normal) { @@ -52,7 +52,7 @@ namespace YooAsset throw new System.NotImplementedException(_flag.ToString()); } } - internal override void Update() + internal override void InternalOnUpdate() { if (_steps == ESteps.None || _steps == ESteps.Done) return; diff --git a/Assets/YooAsset/Runtime/ResourcePackage/Operation/DownloaderOperation.cs b/Assets/YooAsset/Runtime/ResourcePackage/Operation/DownloaderOperation.cs index 3d9dbc1..6f8909a 100644 --- a/Assets/YooAsset/Runtime/ResourcePackage/Operation/DownloaderOperation.cs +++ b/Assets/YooAsset/Runtime/ResourcePackage/Operation/DownloaderOperation.cs @@ -98,12 +98,12 @@ namespace YooAsset // 统计下载信息 CalculatDownloaderInfo(); } - internal override void Start() + internal override void InternalOnStart() { YooLogger.Log($"Begine to download : {TotalDownloadCount} files and {TotalDownloadBytes} bytes"); _steps = ESteps.Check; } - internal override void Update() + internal override void InternalOnUpdate() { if (_steps == ESteps.None || _steps == ESteps.Done) return; diff --git a/Assets/YooAsset/Runtime/ResourcePackage/Operation/InitializationOperation.cs b/Assets/YooAsset/Runtime/ResourcePackage/Operation/InitializationOperation.cs index 0ce43f1..a9879c2 100644 --- a/Assets/YooAsset/Runtime/ResourcePackage/Operation/InitializationOperation.cs +++ b/Assets/YooAsset/Runtime/ResourcePackage/Operation/InitializationOperation.cs @@ -35,11 +35,11 @@ namespace YooAsset _impl = impl; _simulateManifestFilePath = simulateManifestFilePath; } - internal override void Start() + internal override void InternalOnStart() { _steps = ESteps.LoadEditorManifest; } - internal override void Update() + internal override void InternalOnUpdate() { if (_steps == ESteps.LoadEditorManifest) { @@ -93,11 +93,11 @@ namespace YooAsset { _impl = impl; } - internal override void Start() + internal override void InternalOnStart() { _steps = ESteps.QueryBuildinPackageVersion; } - internal override void Update() + internal override void InternalOnUpdate() { if (_steps == ESteps.None || _steps == ESteps.Done) return; @@ -201,11 +201,11 @@ namespace YooAsset { _impl = impl; } - internal override void Start() + internal override void InternalOnStart() { _steps = ESteps.CheckAppFootPrint; } - internal override void Update() + internal override void InternalOnUpdate() { if (_steps == ESteps.None || _steps == ESteps.Done) return; @@ -382,11 +382,11 @@ namespace YooAsset { _impl = impl; } - internal override void Start() + internal override void InternalOnStart() { _steps = ESteps.QueryWebPackageVersion; } - internal override void Update() + internal override void InternalOnUpdate() { if (_steps == ESteps.None || _steps == ESteps.Done) return; diff --git a/Assets/YooAsset/Runtime/ResourcePackage/Operation/Internal/DeserializeManifestOperation.cs b/Assets/YooAsset/Runtime/ResourcePackage/Operation/Internal/DeserializeManifestOperation.cs index f3e2a90..903986c 100644 --- a/Assets/YooAsset/Runtime/ResourcePackage/Operation/Internal/DeserializeManifestOperation.cs +++ b/Assets/YooAsset/Runtime/ResourcePackage/Operation/Internal/DeserializeManifestOperation.cs @@ -32,11 +32,11 @@ namespace YooAsset { _buffer = new BufferReader(binaryData); } - internal override void Start() + internal override void InternalOnStart() { _steps = ESteps.DeserializeFileHeader; } - internal override void Update() + internal override void InternalOnUpdate() { if (_steps == ESteps.None || _steps == ESteps.Done) return; diff --git a/Assets/YooAsset/Runtime/ResourcePackage/Operation/Internal/DownloadManifestOperation.cs b/Assets/YooAsset/Runtime/ResourcePackage/Operation/Internal/DownloadManifestOperation.cs index 9ffdc68..a97431e 100644 --- a/Assets/YooAsset/Runtime/ResourcePackage/Operation/Internal/DownloadManifestOperation.cs +++ b/Assets/YooAsset/Runtime/ResourcePackage/Operation/Internal/DownloadManifestOperation.cs @@ -27,12 +27,12 @@ namespace YooAsset _packageVersion = packageVersion; _timeout = timeout; } - internal override void Start() + internal override void InternalOnStart() { _requestCount = RequestHelper.GetRequestFailedCount(_persistent.PackageName, nameof(DownloadManifestOperation)); _steps = ESteps.DownloadPackageHashFile; } - internal override void Update() + internal override void InternalOnUpdate() { if (_steps == ESteps.None || _steps == ESteps.Done) return; diff --git a/Assets/YooAsset/Runtime/ResourcePackage/Operation/Internal/LoadBuildinManifestOperation.cs b/Assets/YooAsset/Runtime/ResourcePackage/Operation/Internal/LoadBuildinManifestOperation.cs index 2136efc..e827daf 100644 --- a/Assets/YooAsset/Runtime/ResourcePackage/Operation/Internal/LoadBuildinManifestOperation.cs +++ b/Assets/YooAsset/Runtime/ResourcePackage/Operation/Internal/LoadBuildinManifestOperation.cs @@ -28,11 +28,11 @@ namespace YooAsset _persistent = persistent; _buildinPackageVersion = buildinPackageVersion; } - internal override void Start() + internal override void InternalOnStart() { _steps = ESteps.LoadBuildinManifest; } - internal override void Update() + internal override void InternalOnUpdate() { if (_steps == ESteps.None || _steps == ESteps.Done) return; diff --git a/Assets/YooAsset/Runtime/ResourcePackage/Operation/Internal/LoadCacheManifestOperation.cs b/Assets/YooAsset/Runtime/ResourcePackage/Operation/Internal/LoadCacheManifestOperation.cs index ec04b80..3453790 100644 --- a/Assets/YooAsset/Runtime/ResourcePackage/Operation/Internal/LoadCacheManifestOperation.cs +++ b/Assets/YooAsset/Runtime/ResourcePackage/Operation/Internal/LoadCacheManifestOperation.cs @@ -32,11 +32,11 @@ namespace YooAsset _persistent = persistent; _packageVersion = packageVersion; } - internal override void Start() + internal override void InternalOnStart() { _steps = ESteps.QueryCachePackageHash; } - internal override void Update() + internal override void InternalOnUpdate() { if (_steps == ESteps.None || _steps == ESteps.Done) return; diff --git a/Assets/YooAsset/Runtime/ResourcePackage/Operation/Internal/LoadEditorManifestOperation.cs b/Assets/YooAsset/Runtime/ResourcePackage/Operation/Internal/LoadEditorManifestOperation.cs index 5b4396c..d698a2b 100644 --- a/Assets/YooAsset/Runtime/ResourcePackage/Operation/Internal/LoadEditorManifestOperation.cs +++ b/Assets/YooAsset/Runtime/ResourcePackage/Operation/Internal/LoadEditorManifestOperation.cs @@ -28,11 +28,11 @@ namespace YooAsset _packageName = packageName; _manifestFilePath = manifestFilePath; } - internal override void Start() + internal override void InternalOnStart() { _steps = ESteps.LoadEditorManifest; } - internal override void Update() + internal override void InternalOnUpdate() { if (_steps == ESteps.None || _steps == ESteps.Done) return; diff --git a/Assets/YooAsset/Runtime/ResourcePackage/Operation/Internal/LoadRemoteManifestOperation.cs b/Assets/YooAsset/Runtime/ResourcePackage/Operation/Internal/LoadRemoteManifestOperation.cs index 6747554..ff9af72 100644 --- a/Assets/YooAsset/Runtime/ResourcePackage/Operation/Internal/LoadRemoteManifestOperation.cs +++ b/Assets/YooAsset/Runtime/ResourcePackage/Operation/Internal/LoadRemoteManifestOperation.cs @@ -37,12 +37,12 @@ namespace YooAsset _packageVersion = packageVersion; _timeout = timeout; } - internal override void Start() + internal override void InternalOnStart() { _requestCount = RequestHelper.GetRequestFailedCount(_packageName, nameof(LoadRemoteManifestOperation)); _steps = ESteps.DownloadPackageHashFile; } - internal override void Update() + internal override void InternalOnUpdate() { if (_steps == ESteps.None || _steps == ESteps.Done) return; diff --git a/Assets/YooAsset/Runtime/ResourcePackage/Operation/Internal/QueryBuildinPackageVersionOperation.cs b/Assets/YooAsset/Runtime/ResourcePackage/Operation/Internal/QueryBuildinPackageVersionOperation.cs index d5ba73d..c3ec396 100644 --- a/Assets/YooAsset/Runtime/ResourcePackage/Operation/Internal/QueryBuildinPackageVersionOperation.cs +++ b/Assets/YooAsset/Runtime/ResourcePackage/Operation/Internal/QueryBuildinPackageVersionOperation.cs @@ -24,11 +24,11 @@ namespace YooAsset { _persistent = persistent; } - internal override void Start() + internal override void InternalOnStart() { _steps = ESteps.LoadBuildinPackageVersionFile; } - internal override void Update() + internal override void InternalOnUpdate() { if (_steps == ESteps.None || _steps == ESteps.Done) return; diff --git a/Assets/YooAsset/Runtime/ResourcePackage/Operation/Internal/QueryCachePackageHashOperation.cs b/Assets/YooAsset/Runtime/ResourcePackage/Operation/Internal/QueryCachePackageHashOperation.cs index b6c782f..e325095 100644 --- a/Assets/YooAsset/Runtime/ResourcePackage/Operation/Internal/QueryCachePackageHashOperation.cs +++ b/Assets/YooAsset/Runtime/ResourcePackage/Operation/Internal/QueryCachePackageHashOperation.cs @@ -26,11 +26,11 @@ namespace YooAsset _persistent = persistent; _packageVersion = packageVersion; } - internal override void Start() + internal override void InternalOnStart() { _steps = ESteps.LoadCachePackageHashFile; } - internal override void Update() + internal override void InternalOnUpdate() { if (_steps == ESteps.None || _steps == ESteps.Done) return; diff --git a/Assets/YooAsset/Runtime/ResourcePackage/Operation/Internal/QueryCachePackageVersionOperation.cs b/Assets/YooAsset/Runtime/ResourcePackage/Operation/Internal/QueryCachePackageVersionOperation.cs index 77a00bf..f5a8fbf 100644 --- a/Assets/YooAsset/Runtime/ResourcePackage/Operation/Internal/QueryCachePackageVersionOperation.cs +++ b/Assets/YooAsset/Runtime/ResourcePackage/Operation/Internal/QueryCachePackageVersionOperation.cs @@ -24,11 +24,11 @@ namespace YooAsset { _persistent = persistent; } - internal override void Start() + internal override void InternalOnStart() { _steps = ESteps.LoadCachePackageVersionFile; } - internal override void Update() + internal override void InternalOnUpdate() { if (_steps == ESteps.None || _steps == ESteps.Done) return; diff --git a/Assets/YooAsset/Runtime/ResourcePackage/Operation/Internal/QueryRemotePackageHashOperation.cs b/Assets/YooAsset/Runtime/ResourcePackage/Operation/Internal/QueryRemotePackageHashOperation.cs index 41ab26a..0c853eb 100644 --- a/Assets/YooAsset/Runtime/ResourcePackage/Operation/Internal/QueryRemotePackageHashOperation.cs +++ b/Assets/YooAsset/Runtime/ResourcePackage/Operation/Internal/QueryRemotePackageHashOperation.cs @@ -31,12 +31,12 @@ namespace YooAsset _packageVersion = packageVersion; _timeout = timeout; } - internal override void Start() + internal override void InternalOnStart() { _requestCount = RequestHelper.GetRequestFailedCount(_packageName, nameof(QueryRemotePackageHashOperation)); _steps = ESteps.DownloadPackageHash; } - internal override void Update() + internal override void InternalOnUpdate() { if (_steps == ESteps.None || _steps == ESteps.Done) return; diff --git a/Assets/YooAsset/Runtime/ResourcePackage/Operation/Internal/QueryRemotePackageVersionOperation.cs b/Assets/YooAsset/Runtime/ResourcePackage/Operation/Internal/QueryRemotePackageVersionOperation.cs index c64deb5..c58ed21 100644 --- a/Assets/YooAsset/Runtime/ResourcePackage/Operation/Internal/QueryRemotePackageVersionOperation.cs +++ b/Assets/YooAsset/Runtime/ResourcePackage/Operation/Internal/QueryRemotePackageVersionOperation.cs @@ -31,12 +31,12 @@ namespace YooAsset _appendTimeTicks = appendTimeTicks; _timeout = timeout; } - internal override void Start() + internal override void InternalOnStart() { _requestCount = RequestHelper.GetRequestFailedCount(_packageName, nameof(QueryRemotePackageVersionOperation)); _steps = ESteps.DownloadPackageVersion; } - internal override void Update() + internal override void InternalOnUpdate() { if (_steps == ESteps.None || _steps == ESteps.Done) return; diff --git a/Assets/YooAsset/Runtime/ResourcePackage/Operation/Internal/UnpackBuildinManifestOperation.cs b/Assets/YooAsset/Runtime/ResourcePackage/Operation/Internal/UnpackBuildinManifestOperation.cs index 95f7684..898ade8 100644 --- a/Assets/YooAsset/Runtime/ResourcePackage/Operation/Internal/UnpackBuildinManifestOperation.cs +++ b/Assets/YooAsset/Runtime/ResourcePackage/Operation/Internal/UnpackBuildinManifestOperation.cs @@ -22,11 +22,11 @@ namespace YooAsset _persistent = persistent; _buildinPackageVersion = buildinPackageVersion; } - internal override void Start() + internal override void InternalOnStart() { _steps = ESteps.UnpackManifestHashFile; } - internal override void Update() + internal override void InternalOnUpdate() { if (_steps == ESteps.None || _steps == ESteps.Done) return; diff --git a/Assets/YooAsset/Runtime/ResourcePackage/Operation/PreDownloadContentOperation.cs b/Assets/YooAsset/Runtime/ResourcePackage/Operation/PreDownloadContentOperation.cs index 790ddb6..68349ff 100644 --- a/Assets/YooAsset/Runtime/ResourcePackage/Operation/PreDownloadContentOperation.cs +++ b/Assets/YooAsset/Runtime/ResourcePackage/Operation/PreDownloadContentOperation.cs @@ -59,11 +59,11 @@ namespace YooAsset { _impl = impl; } - internal override void Start() + internal override void InternalOnStart() { Status = EOperationStatus.Succeed; } - internal override void Update() + internal override void InternalOnUpdate() { } @@ -96,11 +96,11 @@ namespace YooAsset { _impl = impl; } - internal override void Start() + internal override void InternalOnStart() { Status = EOperationStatus.Succeed; } - internal override void Update() + internal override void InternalOnUpdate() { } @@ -154,11 +154,11 @@ namespace YooAsset _packageVersion = packageVersion; _timeout = timeout; } - internal override void Start() + internal override void InternalOnStart() { _steps = ESteps.CheckActiveManifest; } - internal override void Update() + internal override void InternalOnUpdate() { if (_steps == ESteps.None || _steps == ESteps.Done) return; @@ -331,11 +331,11 @@ namespace YooAsset { _impl = impl; } - internal override void Start() + internal override void InternalOnStart() { Status = EOperationStatus.Succeed; } - internal override void Update() + internal override void InternalOnUpdate() { } diff --git a/Assets/YooAsset/Runtime/ResourcePackage/Operation/UpdatePackageManifestOperation.cs b/Assets/YooAsset/Runtime/ResourcePackage/Operation/UpdatePackageManifestOperation.cs index b078f66..f2ce4d1 100644 --- a/Assets/YooAsset/Runtime/ResourcePackage/Operation/UpdatePackageManifestOperation.cs +++ b/Assets/YooAsset/Runtime/ResourcePackage/Operation/UpdatePackageManifestOperation.cs @@ -23,11 +23,11 @@ namespace YooAsset public EditorPlayModeUpdatePackageManifestOperation() { } - internal override void Start() + internal override void InternalOnStart() { Status = EOperationStatus.Succeed; } - internal override void Update() + internal override void InternalOnUpdate() { } } @@ -40,11 +40,11 @@ namespace YooAsset public OfflinePlayModeUpdatePackageManifestOperation() { } - internal override void Start() + internal override void InternalOnStart() { Status = EOperationStatus.Succeed; } - internal override void Update() + internal override void InternalOnUpdate() { } } @@ -84,11 +84,11 @@ namespace YooAsset _autoSaveVersion = autoSaveVersion; _timeout = timeout; } - internal override void Start() + internal override void InternalOnStart() { _steps = ESteps.CheckParams; } - internal override void Update() + internal override void InternalOnUpdate() { if (_steps == ESteps.None || _steps == ESteps.Done) return; @@ -229,11 +229,11 @@ namespace YooAsset _packageVersion = packageVersion; _timeout = timeout; } - internal override void Start() + internal override void InternalOnStart() { _steps = ESteps.CheckParams; } - internal override void Update() + internal override void InternalOnUpdate() { if (_steps == ESteps.None || _steps == ESteps.Done) return; diff --git a/Assets/YooAsset/Runtime/ResourcePackage/Operation/UpdatePackageVersionOperation.cs b/Assets/YooAsset/Runtime/ResourcePackage/Operation/UpdatePackageVersionOperation.cs index 1ed68ba..b580c78 100644 --- a/Assets/YooAsset/Runtime/ResourcePackage/Operation/UpdatePackageVersionOperation.cs +++ b/Assets/YooAsset/Runtime/ResourcePackage/Operation/UpdatePackageVersionOperation.cs @@ -20,11 +20,11 @@ namespace YooAsset /// internal sealed class EditorPlayModeUpdatePackageVersionOperation : UpdatePackageVersionOperation { - internal override void Start() + internal override void InternalOnStart() { Status = EOperationStatus.Succeed; } - internal override void Update() + internal override void InternalOnUpdate() { } } @@ -34,11 +34,11 @@ namespace YooAsset /// internal sealed class OfflinePlayModeUpdatePackageVersionOperation : UpdatePackageVersionOperation { - internal override void Start() + internal override void InternalOnStart() { Status = EOperationStatus.Succeed; } - internal override void Update() + internal override void InternalOnUpdate() { } } @@ -67,11 +67,11 @@ namespace YooAsset _appendTimeTicks = appendTimeTicks; _timeout = timeout; } - internal override void Start() + internal override void InternalOnStart() { _steps = ESteps.QueryRemotePackageVersion; } - internal override void Update() + internal override void InternalOnUpdate() { if (_steps == ESteps.None || _steps == ESteps.Done) return; @@ -127,11 +127,11 @@ namespace YooAsset _appendTimeTicks = appendTimeTicks; _timeout = timeout; } - internal override void Start() + internal override void InternalOnStart() { _steps = ESteps.QueryRemotePackageVersion; } - internal override void Update() + internal override void InternalOnUpdate() { if (_steps == ESteps.None || _steps == ESteps.Done) return;