From 3f027e54565276041f0dcfd1ce24f958840987dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=95=E5=86=A0=E5=B3=B0?= Date: Fri, 30 Aug 2024 18:45:58 +0800 Subject: [PATCH] fix #361 --- .../Runtime/ResourceManager/Handle/HandleBase.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Assets/YooAsset/Runtime/ResourceManager/Handle/HandleBase.cs b/Assets/YooAsset/Runtime/ResourceManager/Handle/HandleBase.cs index 5638d20..c856d59 100644 --- a/Assets/YooAsset/Runtime/ResourceManager/Handle/HandleBase.cs +++ b/Assets/YooAsset/Runtime/ResourceManager/Handle/HandleBase.cs @@ -29,9 +29,7 @@ namespace YooAsset public DownloadStatus GetDownloadStatus() { if (IsValidWithWarning == false) - { return DownloadStatus.CreateDefaultStatus(); - } return Provider.GetDownloadStatus(); } @@ -44,7 +42,6 @@ namespace YooAsset { if (IsValidWithWarning == false) return EOperationStatus.None; - return Provider.Status; } } @@ -83,7 +80,7 @@ namespace YooAsset get { if (IsValidWithWarning == false) - return false; + return true; return Provider.IsDone; } } @@ -141,7 +138,12 @@ namespace YooAsset /// public System.Threading.Tasks.Task Task { - get { return Provider.Task; } + get + { + if (IsValidWithWarning == false) + return null; + return Provider.Task; + } } // 协程相关