update yooasset2.0

pull/189/head
hevinci 2023-09-25 10:45:21 +08:00
parent e207d834bd
commit 61e06dee4c
4 changed files with 12 additions and 12 deletions

View File

@ -18,7 +18,7 @@ namespace YooAsset
private UnityWebFileRequester _downloader1;
private UnityWebFileRequester _downloader2;
private ESteps _steps = ESteps.None;
private int RequestCount = 0;
private int _requestCount = 0;
internal DownloadManifestOperation(PersistentManager persistent, IRemoteServices remoteServices, string packageVersion, int timeout)
{
@ -29,7 +29,7 @@ namespace YooAsset
}
internal override void Start()
{
RequestCount = RequestHelper.GetRequestFailedCount(_persistent.PackageName, nameof(DownloadManifestOperation));
_requestCount = RequestHelper.GetRequestFailedCount(_persistent.PackageName, nameof(DownloadManifestOperation));
_steps = ESteps.DownloadPackageHashFile;
}
internal override void Update()
@ -104,7 +104,7 @@ namespace YooAsset
private string GetDownloadRequestURL(string fileName)
{
// 轮流返回请求地址
if (RequestCount % 2 == 0)
if (_requestCount % 2 == 0)
return _remoteServices.GetRemoteMainURL(fileName);
else
return _remoteServices.GetRemoteFallbackURL(fileName);

View File

@ -22,7 +22,7 @@ namespace YooAsset
private DeserializeManifestOperation _deserializer;
private byte[] _fileData;
private ESteps _steps = ESteps.None;
private int RequestCount = 0;
private int _requestCount = 0;
/// <summary>
/// 加载的清单实例
@ -39,7 +39,7 @@ namespace YooAsset
}
internal override void Start()
{
RequestCount = RequestHelper.GetRequestFailedCount(_packageName, nameof(LoadRemoteManifestOperation));
_requestCount = RequestHelper.GetRequestFailedCount(_packageName, nameof(LoadRemoteManifestOperation));
_steps = ESteps.DownloadPackageHashFile;
}
internal override void Update()
@ -142,7 +142,7 @@ namespace YooAsset
private string GetDownloadRequestURL(string fileName)
{
// 轮流返回请求地址
if (RequestCount % 2 == 0)
if (_requestCount % 2 == 0)
return _remoteServices.GetRemoteMainURL(fileName);
else
return _remoteServices.GetRemoteFallbackURL(fileName);

View File

@ -16,7 +16,7 @@ namespace YooAsset
private readonly int _timeout;
private UnityWebDataRequester _downloader;
private ESteps _steps = ESteps.None;
private int RequestCount = 0;
private int _requestCount = 0;
/// <summary>
/// 包裹哈希值
@ -33,7 +33,7 @@ namespace YooAsset
}
internal override void Start()
{
RequestCount = RequestHelper.GetRequestFailedCount(_packageName, nameof(QueryRemotePackageHashOperation));
_requestCount = RequestHelper.GetRequestFailedCount(_packageName, nameof(QueryRemotePackageHashOperation));
_steps = ESteps.DownloadPackageHash;
}
internal override void Update()
@ -89,7 +89,7 @@ namespace YooAsset
string url;
// 轮流返回请求地址
if (RequestCount % 2 == 0)
if (_requestCount % 2 == 0)
url = _remoteServices.GetRemoteMainURL(fileName);
else
url = _remoteServices.GetRemoteFallbackURL(fileName);

View File

@ -16,7 +16,7 @@ namespace YooAsset
private readonly int _timeout;
private UnityWebDataRequester _downloader;
private ESteps _steps = ESteps.None;
private int RequestCount = 0;
private int _requestCount = 0;
/// <summary>
/// 包裹版本
@ -33,7 +33,7 @@ namespace YooAsset
}
internal override void Start()
{
RequestCount = RequestHelper.GetRequestFailedCount(_packageName, nameof(QueryRemotePackageVersionOperation));
_requestCount = RequestHelper.GetRequestFailedCount(_packageName, nameof(QueryRemotePackageVersionOperation));
_steps = ESteps.DownloadPackageVersion;
}
internal override void Update()
@ -89,7 +89,7 @@ namespace YooAsset
string url;
// 轮流返回请求地址
if (RequestCount % 2 == 0)
if (_requestCount % 2 == 0)
url = _remoteServices.GetRemoteMainURL(fileName);
else
url = _remoteServices.GetRemoteFallbackURL(fileName);