Add process operation method.

增加开启异步操作的方法。
pull/9/head
hevinci 2022-05-07 18:23:00 +08:00
parent afc08d4e46
commit 42703def02
3 changed files with 38 additions and 0 deletions

View File

@ -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() { }
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: ff8a96dd005f55346986f8a98aff8c99
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -286,6 +286,15 @@ namespace YooAsset
} }
} }
/// <summary>
/// 开启一个异步操作
/// </summary>
/// <param name="operation">异步操作对象</param>
public static void ProcessOperaiton(GameAsyncOperation operation)
{
OperationSystem.ProcessOperaiton(operation);
}
/// <summary> /// <summary>
/// 获取资源版本号 /// 获取资源版本号
/// </summary> /// </summary>