refactor : 重构网络下载模块

This commit is contained in:
何冠峰
2026-01-07 15:08:05 +08:00
parent ee67a55c0f
commit 9b83dcf723
8 changed files with 31 additions and 32 deletions
@@ -46,16 +46,7 @@ namespace YooAsset
/// </summary>
protected override void OnRequestSucceed()
{
var fileData = _webRequest.downloadHandler.data;
if (fileData == null || fileData.Length == 0)
{
Status = EDownloadRequestStatus.Failed;
Error = $"[{GetType().Name}] URL: {URL} - Download bytes data is null or empty !";
}
else
{
Result = fileData;
}
Result = _webRequest.downloadHandler.data;
}
}
}