diff --git a/Assets/YooAsset/Runtime/AssetSystem/Operations/InstantiateOperation.cs b/Assets/YooAsset/Runtime/AssetSystem/Operations/InstantiateOperation.cs
index 19bff32..ca3be38 100644
--- a/Assets/YooAsset/Runtime/AssetSystem/Operations/InstantiateOperation.cs
+++ b/Assets/YooAsset/Runtime/AssetSystem/Operations/InstantiateOperation.cs
@@ -81,7 +81,11 @@ namespace YooAsset
Status = EOperationStatus.Succeed;
}
}
- public override void Cancel()
+
+ ///
+ /// 取消实例化对象操作
+ ///
+ public void Cancel()
{
if (IsDone == false)
{
diff --git a/Assets/YooAsset/Runtime/OperationSystem/AsyncOperationBase.cs b/Assets/YooAsset/Runtime/OperationSystem/AsyncOperationBase.cs
index 0730ed8..f2cbed6 100644
--- a/Assets/YooAsset/Runtime/OperationSystem/AsyncOperationBase.cs
+++ b/Assets/YooAsset/Runtime/OperationSystem/AsyncOperationBase.cs
@@ -81,14 +81,6 @@ namespace YooAsset
_taskCompletionSource.TrySetResult(null);
}
- ///
- /// 取消异步操作
- ///
- public virtual void Cancel()
- {
- throw new NotImplementedException("Can not cancel operation !");
- }
-
#region 异步编程相关
bool IEnumerator.MoveNext()
{
diff --git a/Assets/YooAsset/Runtime/OperationSystem/GameAsyncOperation.cs b/Assets/YooAsset/Runtime/OperationSystem/GameAsyncOperation.cs
index fe8b2ae..813a4d6 100644
--- a/Assets/YooAsset/Runtime/OperationSystem/GameAsyncOperation.cs
+++ b/Assets/YooAsset/Runtime/OperationSystem/GameAsyncOperation.cs
@@ -1,7 +1,7 @@
namespace YooAsset
{
- public class GameAsyncOperation : AsyncOperationBase
+ public abstract class GameAsyncOperation : AsyncOperationBase
{
internal override void Start()
{
@@ -12,7 +12,7 @@ namespace YooAsset
OnUpdate();
}
- protected virtual void OnStart() { }
- protected virtual void OnUpdate() { }
+ protected abstract void OnStart();
+ protected abstract void OnUpdate();
}
}
\ No newline at end of file