From 6877900ac27f53b9e395bb04fd1eaf3cfac3bdeb Mon Sep 17 00:00:00 2001 From: hevinci Date: Wed, 27 Sep 2023 16:31:24 +0800 Subject: [PATCH] update download system --- .../Runtime/DownloadSystem/Downloader/WebDownloader.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Assets/YooAsset/Runtime/DownloadSystem/Downloader/WebDownloader.cs b/Assets/YooAsset/Runtime/DownloadSystem/Downloader/WebDownloader.cs index b5a5666..87fb363 100644 --- a/Assets/YooAsset/Runtime/DownloadSystem/Downloader/WebDownloader.cs +++ b/Assets/YooAsset/Runtime/DownloadSystem/Downloader/WebDownloader.cs @@ -19,7 +19,7 @@ namespace YooAsset } private ESteps _steps = ESteps.None; - private bool _getAssetBundle; + private bool _getAssetBundle = false; public WebDownloader(BundleInfo bundleInfo, System.Type requesterType, int failedTryAgain, int timeout) : base(bundleInfo, requesterType, failedTryAgain, timeout) { @@ -28,7 +28,10 @@ namespace YooAsset { if (_steps == ESteps.None) { - _getAssetBundle = (bool)args[0]; + if (args.Length > 0) + { + _getAssetBundle = (bool)args[0]; + } _steps = ESteps.PrepareDownload; } }