update download system
remove timeout
This commit is contained in:
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace YooAsset
|
||||
{
|
||||
internal abstract class DownloadAssetBundleOperation : AsyncOperationBase
|
||||
internal abstract class LoadWebAssetBundleOperation : AsyncOperationBase
|
||||
{
|
||||
/// <summary>
|
||||
/// AssetBundle对象
|
||||
+3
-7
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace YooAsset
|
||||
{
|
||||
internal class DownloadEncryptAssetBundleOperation : DownloadAssetBundleOperation
|
||||
internal class LoadWebEncryptAssetBundleOperation : LoadWebAssetBundleOperation
|
||||
{
|
||||
protected enum ESteps
|
||||
{
|
||||
@@ -16,7 +16,6 @@ namespace YooAsset
|
||||
private UnityWebDataRequestOperation _unityWebDataRequestOp;
|
||||
private readonly PackageBundle _bundle;
|
||||
private readonly DownloadFileOptions _options;
|
||||
private readonly bool _checkTimeout;
|
||||
private readonly IWebDecryptionServices _decryptionServices;
|
||||
|
||||
protected int _requestCount = 0;
|
||||
@@ -24,11 +23,10 @@ namespace YooAsset
|
||||
protected int _failedTryAgain;
|
||||
private ESteps _steps = ESteps.None;
|
||||
|
||||
internal DownloadEncryptAssetBundleOperation(PackageBundle bundle, DownloadFileOptions options, bool checkTimeout, IWebDecryptionServices decryptionServices)
|
||||
internal LoadWebEncryptAssetBundleOperation(PackageBundle bundle, DownloadFileOptions options, IWebDecryptionServices decryptionServices)
|
||||
{
|
||||
_bundle = bundle;
|
||||
_options = options;
|
||||
_checkTimeout = checkTimeout;
|
||||
_decryptionServices = decryptionServices;
|
||||
}
|
||||
internal override void InternalStart()
|
||||
@@ -53,10 +51,8 @@ namespace YooAsset
|
||||
}
|
||||
|
||||
string url = GetRequestURL();
|
||||
_unityWebDataRequestOp = new UnityWebDataRequestOperation(url, _options.Timeout);
|
||||
_unityWebDataRequestOp = new UnityWebDataRequestOperation(url, 0);
|
||||
_unityWebDataRequestOp.StartOperation();
|
||||
if (_checkTimeout == false)
|
||||
_unityWebDataRequestOp.DontCheckTimeout();
|
||||
_steps = ESteps.CheckRequest;
|
||||
}
|
||||
|
||||
+5
-5
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace YooAsset
|
||||
{
|
||||
internal class DownloadNormalAssetBundleOperation : DownloadAssetBundleOperation
|
||||
internal class LoadWebNormalAssetBundleOperation : LoadWebAssetBundleOperation
|
||||
{
|
||||
protected enum ESteps
|
||||
{
|
||||
@@ -13,18 +13,18 @@ namespace YooAsset
|
||||
Done,
|
||||
}
|
||||
|
||||
private UnityAssetBundleRequestOperation _unityAssetBundleRequestOp;
|
||||
private readonly PackageBundle _bundle;
|
||||
private readonly DownloadFileOptions _options;
|
||||
private readonly bool _disableUnityWebCache;
|
||||
|
||||
private UnityAssetBundleRequestOperation _unityAssetBundleRequestOp;
|
||||
|
||||
protected int _requestCount = 0;
|
||||
protected float _tryAgainTimer;
|
||||
protected int _failedTryAgain;
|
||||
private ESteps _steps = ESteps.None;
|
||||
|
||||
|
||||
internal DownloadNormalAssetBundleOperation(PackageBundle bundle, DownloadFileOptions options, bool disableUnityWebCache)
|
||||
internal LoadWebNormalAssetBundleOperation(PackageBundle bundle, DownloadFileOptions options, bool disableUnityWebCache)
|
||||
{
|
||||
_bundle = bundle;
|
||||
_options = options;
|
||||
@@ -43,7 +43,7 @@ namespace YooAsset
|
||||
if (_steps == ESteps.CreateRequest)
|
||||
{
|
||||
string url = GetRequestURL();
|
||||
_unityAssetBundleRequestOp = new UnityAssetBundleRequestOperation(_bundle, _disableUnityWebCache, url, _options.Timeout);
|
||||
_unityAssetBundleRequestOp = new UnityAssetBundleRequestOperation(_bundle, _disableUnityWebCache, url);
|
||||
_unityAssetBundleRequestOp.StartOperation();
|
||||
_steps = ESteps.CheckRequest;
|
||||
}
|
||||
Reference in New Issue
Block a user