diff --git a/Assets/YooAsset/Runtime/OperationSystem/GameAsyncOperation.cs b/Assets/YooAsset/Runtime/OperationSystem/GameAsyncOperation.cs new file mode 100644 index 0000000..fe8b2ae --- /dev/null +++ b/Assets/YooAsset/Runtime/OperationSystem/GameAsyncOperation.cs @@ -0,0 +1,18 @@ + +namespace YooAsset +{ + public class GameAsyncOperation : AsyncOperationBase + { + internal override void Start() + { + OnStart(); + } + internal override void Update() + { + OnUpdate(); + } + + protected virtual void OnStart() { } + protected virtual void OnUpdate() { } + } +} \ No newline at end of file diff --git a/Assets/YooAsset/Runtime/OperationSystem/GameAsyncOperation.cs.meta b/Assets/YooAsset/Runtime/OperationSystem/GameAsyncOperation.cs.meta new file mode 100644 index 0000000..90cbe4b --- /dev/null +++ b/Assets/YooAsset/Runtime/OperationSystem/GameAsyncOperation.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ff8a96dd005f55346986f8a98aff8c99 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/YooAsset/Runtime/YooAssets.cs b/Assets/YooAsset/Runtime/YooAssets.cs index 49a0fab..1acef15 100644 --- a/Assets/YooAsset/Runtime/YooAssets.cs +++ b/Assets/YooAsset/Runtime/YooAssets.cs @@ -286,6 +286,15 @@ namespace YooAsset } } + /// + /// 开启一个异步操作 + /// + /// 异步操作对象 + public static void ProcessOperaiton(GameAsyncOperation operation) + { + OperationSystem.ProcessOperaiton(operation); + } + /// /// 获取资源版本号 ///