mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-07 16:45:10 +00:00
增加使用UniTask的常用资源加载接口
增加使用UniTask的常用资源加载接口
This commit is contained in:
@@ -578,6 +578,8 @@ namespace TEngine
|
||||
|
||||
bool cancelOrFailed = await handle.ToUniTask().AttachExternalCancellation(cancellationToken).SuppressCancellationThrow();
|
||||
|
||||
handle.Dispose();
|
||||
|
||||
return cancelOrFailed ? null : handle;
|
||||
}
|
||||
|
||||
@@ -602,6 +604,8 @@ namespace TEngine
|
||||
|
||||
bool cancelOrFailed = await handle.ToUniTask().AttachExternalCancellation(cancellationToken).SuppressCancellationThrow();
|
||||
|
||||
handle.Dispose();
|
||||
|
||||
return cancelOrFailed ? null : handle.GetSubAssetObject<T>(assetName);
|
||||
}
|
||||
|
||||
@@ -625,6 +629,8 @@ namespace TEngine
|
||||
|
||||
bool cancelOrFailed = await handle.ToUniTask().AttachExternalCancellation(cancellationToken).SuppressCancellationThrow();
|
||||
|
||||
handle.Dispose();
|
||||
|
||||
return cancelOrFailed ? null : handle.GetSubAssetObjects<T>();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user