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 fileText = _webRequest.downloadHandler.text;
if (string.IsNullOrEmpty(fileText))
{
Status = EDownloadRequestStatus.Failed;
Error = $"[{GetType().Name}] URL: {URL} - Download text data is null or empty";
}
else
{
Result = fileText;
}
Result = _webRequest.downloadHandler.text;
}
}
}