From 4c8c37ffd80a45196c9fba3c375edd4c8a665ef9 Mon Sep 17 00:00:00 2001
From: ALEXTANGXIAO <574809918@qq.com>
Date: Wed, 4 Oct 2023 18:58:45 +0800
Subject: [PATCH] =?UTF-8?q?=E5=BC=82=E6=AD=A5=E5=8A=A0=E8=BD=BD=E5=8E=9F?=
=?UTF-8?q?=E7=94=9F=E6=96=87=E4=BB=B6=E6=8E=A5=E5=8F=A3=E9=97=AE=E9=A2=98?=
=?UTF-8?q?=E4=BF=AE=E6=AD=A3=E3=80=82?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
异步加载原生文件接口问题修正。
---
.../TEngine/Runtime/GameFramework/Resource/ResourceManager.cs | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/Assets/TEngine/Runtime/GameFramework/Resource/ResourceManager.cs b/Assets/TEngine/Runtime/GameFramework/Resource/ResourceManager.cs
index 59dae045..3eb80da9 100644
--- a/Assets/TEngine/Runtime/GameFramework/Resource/ResourceManager.cs
+++ b/Assets/TEngine/Runtime/GameFramework/Resource/ResourceManager.cs
@@ -587,14 +587,13 @@ namespace TEngine
/// 资源定位地址。
/// 取消操作Token。
/// 原生文件资源实例操作句柄。
+ /// 需要自行释放资源句柄(RawFileOperationHandle)。
public async UniTask LoadRawAssetAsync(string location, CancellationToken cancellationToken)
{
RawFileOperationHandle handle = YooAssets.LoadRawFileAsync(location);
bool cancelOrFailed = await handle.ToUniTask().AttachExternalCancellation(cancellationToken).SuppressCancellationThrow();
- handle.Dispose();
-
return cancelOrFailed ? null : handle;
}