This commit is contained in:
何冠峰
2025-12-03 10:14:55 +08:00
parent aeaf03011f
commit abb087b02e
12 changed files with 30 additions and 16 deletions

View File

@@ -20,7 +20,7 @@ namespace YooAsset
private UnityDownloadFileOperation _unityDownloadFileOp; private UnityDownloadFileOperation _unityDownloadFileOp;
protected int _requestCount = 0; protected int _requestCount = 0;
protected float _tryAgainTimer; protected float _tryAgainTimer = 0;
protected int _failedTryAgain; protected int _failedTryAgain;
private ESteps _steps = ESteps.None; private ESteps _steps = ESteps.None;

View File

@@ -20,7 +20,7 @@ namespace YooAsset
protected UnityVirtualBundleRequestOperation _unityDownloadFileOp; protected UnityVirtualBundleRequestOperation _unityDownloadFileOp;
protected int _requestCount = 0; protected int _requestCount = 0;
protected float _tryAgainTimer; protected float _tryAgainTimer = 0;
protected int _failedTryAgain; protected int _failedTryAgain;
private ESteps _steps = ESteps.None; private ESteps _steps = ESteps.None;

View File

@@ -18,15 +18,16 @@ namespace YooAsset
private readonly IWebDecryptionServices _decryptionServices; private readonly IWebDecryptionServices _decryptionServices;
private UnityWebDataRequestOperation _unityWebDataRequestOp; private UnityWebDataRequestOperation _unityWebDataRequestOp;
protected int _requestCount = 0; private int _requestCount = 0;
protected float _tryAgainTimer; private float _tryAgainTimer = 0;
protected int _failedTryAgain; private int _failedTryAgain;
private ESteps _steps = ESteps.None; private ESteps _steps = ESteps.None;
internal LoadWebEncryptAssetBundleOperation(PackageBundle bundle, DownloadFileOptions options, IWebDecryptionServices decryptionServices) internal LoadWebEncryptAssetBundleOperation(PackageBundle bundle, DownloadFileOptions options, IWebDecryptionServices decryptionServices)
{ {
_bundle = bundle; _bundle = bundle;
_options = options; _options = options;
_failedTryAgain = options.FailedTryAgain;
_decryptionServices = decryptionServices; _decryptionServices = decryptionServices;
} }
internal override void InternalStart() internal override void InternalStart()

View File

@@ -18,9 +18,9 @@ namespace YooAsset
private readonly bool _disableUnityWebCache; private readonly bool _disableUnityWebCache;
private UnityAssetBundleRequestOperation _unityAssetBundleRequestOp; private UnityAssetBundleRequestOperation _unityAssetBundleRequestOp;
protected int _requestCount = 0; private int _requestCount = 0;
protected float _tryAgainTimer; private float _tryAgainTimer = 0;
protected int _failedTryAgain; private int _failedTryAgain;
private ESteps _steps = ESteps.None; private ESteps _steps = ESteps.None;
@@ -28,6 +28,7 @@ namespace YooAsset
{ {
_bundle = bundle; _bundle = bundle;
_options = options; _options = options;
_failedTryAgain = options.FailedTryAgain;
_disableUnityWebCache = disableUnityWebCache; _disableUnityWebCache = disableUnityWebCache;
} }
internal override void InternalStart() internal override void InternalStart()

View File

@@ -16,8 +16,9 @@ internal class APFSDownloadFileOperation : FSDownloadFileOperation
private readonly AlipayFileSystem _fileSystem; private readonly AlipayFileSystem _fileSystem;
private readonly DownloadFileOptions _options; private readonly DownloadFileOptions _options;
private UnityWebCacheRequestOperation _webCacheRequestOp; private UnityWebCacheRequestOperation _webCacheRequestOp;
private int _requestCount = 0; private int _requestCount = 0;
private float _tryAgainTimer; private float _tryAgainTimer = 0;
private int _failedTryAgain; private int _failedTryAgain;
private ESteps _steps = ESteps.None; private ESteps _steps = ESteps.None;
@@ -25,6 +26,7 @@ internal class APFSDownloadFileOperation : FSDownloadFileOperation
{ {
_fileSystem = fileSystem; _fileSystem = fileSystem;
_options = options; _options = options;
_failedTryAgain = options.FailedTryAgain;
} }
internal override void InternalStart() internal override void InternalStart()
{ {

View File

@@ -20,7 +20,7 @@ namespace YooAsset
private UnityAlipayAssetBundleRequestOperation _unityAssetBundleRequestOp; private UnityAlipayAssetBundleRequestOperation _unityAssetBundleRequestOp;
private int _requestCount = 0; private int _requestCount = 0;
private float _tryAgainTimer; private float _tryAgainTimer = 0;
private int _failedTryAgain; private int _failedTryAgain;
private ESteps _steps = ESteps.None; private ESteps _steps = ESteps.None;
@@ -29,6 +29,7 @@ namespace YooAsset
{ {
_bundle = bundle; _bundle = bundle;
_options = options; _options = options;
_failedTryAgain = options.FailedTryAgain;
} }
internal override void InternalStart() internal override void InternalStart()
{ {

View File

@@ -16,8 +16,9 @@ internal class TPFSDownloadFileOperation : FSDownloadFileOperation
private readonly TaptapFileSystem _fileSystem; private readonly TaptapFileSystem _fileSystem;
private readonly DownloadFileOptions _options; private readonly DownloadFileOptions _options;
private UnityWebCacheRequestOperation _webCacheRequestOp; private UnityWebCacheRequestOperation _webCacheRequestOp;
private int _requestCount = 0; private int _requestCount = 0;
private float _tryAgainTimer; private float _tryAgainTimer = 0;
private int _failedTryAgain; private int _failedTryAgain;
private ESteps _steps = ESteps.None; private ESteps _steps = ESteps.None;
@@ -25,6 +26,7 @@ internal class TPFSDownloadFileOperation : FSDownloadFileOperation
{ {
_fileSystem = fileSystem; _fileSystem = fileSystem;
_options = options; _options = options;
_failedTryAgain = options.FailedTryAgain;
} }
internal override void InternalStart() internal override void InternalStart()
{ {

View File

@@ -19,7 +19,7 @@ namespace YooAsset
private UnityTaptapAssetBundleRequestOperation _unityAssetBundleRequestOp; private UnityTaptapAssetBundleRequestOperation _unityAssetBundleRequestOp;
private int _requestCount = 0; private int _requestCount = 0;
private float _tryAgainTimer; private float _tryAgainTimer = 0;
private int _failedTryAgain; private int _failedTryAgain;
private ESteps _steps = ESteps.None; private ESteps _steps = ESteps.None;
@@ -28,6 +28,7 @@ namespace YooAsset
{ {
_bundle = bundle; _bundle = bundle;
_options = options; _options = options;
_failedTryAgain = options.FailedTryAgain;
} }
internal override void InternalStart() internal override void InternalStart()
{ {

View File

@@ -16,8 +16,9 @@ internal class TTFSDownloadFileOperation : FSDownloadFileOperation
private readonly TiktokFileSystem _fileSystem; private readonly TiktokFileSystem _fileSystem;
private readonly DownloadFileOptions _options; private readonly DownloadFileOptions _options;
private UnityWebCacheRequestOperation _webCacheRequestOp; private UnityWebCacheRequestOperation _webCacheRequestOp;
private int _requestCount = 0; private int _requestCount = 0;
private float _tryAgainTimer; private float _tryAgainTimer = 0;
private int _failedTryAgain; private int _failedTryAgain;
private ESteps _steps = ESteps.None; private ESteps _steps = ESteps.None;
@@ -25,6 +26,7 @@ internal class TTFSDownloadFileOperation : FSDownloadFileOperation
{ {
_fileSystem = fileSystem; _fileSystem = fileSystem;
_options = options; _options = options;
_failedTryAgain = options.FailedTryAgain;
} }
internal override void InternalStart() internal override void InternalStart()
{ {

View File

@@ -19,7 +19,7 @@ namespace YooAsset
private UnityTiktokAssetBundleRequestOperation _unityAssetBundleRequestOp; private UnityTiktokAssetBundleRequestOperation _unityAssetBundleRequestOp;
private int _requestCount = 0; private int _requestCount = 0;
private float _tryAgainTimer; private float _tryAgainTimer = 0;
private int _failedTryAgain; private int _failedTryAgain;
private ESteps _steps = ESteps.None; private ESteps _steps = ESteps.None;
@@ -28,6 +28,7 @@ namespace YooAsset
{ {
_bundle = bundle; _bundle = bundle;
_options = options; _options = options;
_failedTryAgain = options.FailedTryAgain;
} }
internal override void InternalStart() internal override void InternalStart()
{ {

View File

@@ -16,8 +16,9 @@ internal class WXFSDownloadFileOperation : FSDownloadFileOperation
private readonly WechatFileSystem _fileSystem; private readonly WechatFileSystem _fileSystem;
private readonly DownloadFileOptions _options; private readonly DownloadFileOptions _options;
private UnityWebCacheRequestOperation _webCacheRequestOp; private UnityWebCacheRequestOperation _webCacheRequestOp;
private int _requestCount = 0; private int _requestCount = 0;
private float _tryAgainTimer; private float _tryAgainTimer = 0;
private int _failedTryAgain; private int _failedTryAgain;
private ESteps _steps = ESteps.None; private ESteps _steps = ESteps.None;
@@ -25,6 +26,7 @@ internal class WXFSDownloadFileOperation : FSDownloadFileOperation
{ {
_fileSystem = fileSystem; _fileSystem = fileSystem;
_options = options; _options = options;
_failedTryAgain = options.FailedTryAgain;
} }
internal override void InternalStart() internal override void InternalStart()
{ {

View File

@@ -19,7 +19,7 @@ namespace YooAsset
private UnityWechatAssetBundleRequestOperation _unityAssetBundleRequestOp; private UnityWechatAssetBundleRequestOperation _unityAssetBundleRequestOp;
private int _requestCount = 0; private int _requestCount = 0;
private float _tryAgainTimer; private float _tryAgainTimer = 0;
private int _failedTryAgain; private int _failedTryAgain;
private ESteps _steps = ESteps.None; private ESteps _steps = ESteps.None;
@@ -28,6 +28,7 @@ namespace YooAsset
{ {
_bundle = bundle; _bundle = bundle;
_options = options; _options = options;
_failedTryAgain = options.FailedTryAgain;
} }
internal override void InternalStart() internal override void InternalStart()
{ {