mirror of https://github.com/tuyoogame/YooAsset
update yooasset2.0
parent
e207d834bd
commit
61e06dee4c
|
@ -18,7 +18,7 @@ namespace YooAsset
|
||||||
private UnityWebFileRequester _downloader1;
|
private UnityWebFileRequester _downloader1;
|
||||||
private UnityWebFileRequester _downloader2;
|
private UnityWebFileRequester _downloader2;
|
||||||
private ESteps _steps = ESteps.None;
|
private ESteps _steps = ESteps.None;
|
||||||
private int RequestCount = 0;
|
private int _requestCount = 0;
|
||||||
|
|
||||||
internal DownloadManifestOperation(PersistentManager persistent, IRemoteServices remoteServices, string packageVersion, int timeout)
|
internal DownloadManifestOperation(PersistentManager persistent, IRemoteServices remoteServices, string packageVersion, int timeout)
|
||||||
{
|
{
|
||||||
|
@ -29,7 +29,7 @@ namespace YooAsset
|
||||||
}
|
}
|
||||||
internal override void Start()
|
internal override void Start()
|
||||||
{
|
{
|
||||||
RequestCount = RequestHelper.GetRequestFailedCount(_persistent.PackageName, nameof(DownloadManifestOperation));
|
_requestCount = RequestHelper.GetRequestFailedCount(_persistent.PackageName, nameof(DownloadManifestOperation));
|
||||||
_steps = ESteps.DownloadPackageHashFile;
|
_steps = ESteps.DownloadPackageHashFile;
|
||||||
}
|
}
|
||||||
internal override void Update()
|
internal override void Update()
|
||||||
|
@ -104,7 +104,7 @@ namespace YooAsset
|
||||||
private string GetDownloadRequestURL(string fileName)
|
private string GetDownloadRequestURL(string fileName)
|
||||||
{
|
{
|
||||||
// 轮流返回请求地址
|
// 轮流返回请求地址
|
||||||
if (RequestCount % 2 == 0)
|
if (_requestCount % 2 == 0)
|
||||||
return _remoteServices.GetRemoteMainURL(fileName);
|
return _remoteServices.GetRemoteMainURL(fileName);
|
||||||
else
|
else
|
||||||
return _remoteServices.GetRemoteFallbackURL(fileName);
|
return _remoteServices.GetRemoteFallbackURL(fileName);
|
||||||
|
|
|
@ -22,7 +22,7 @@ namespace YooAsset
|
||||||
private DeserializeManifestOperation _deserializer;
|
private DeserializeManifestOperation _deserializer;
|
||||||
private byte[] _fileData;
|
private byte[] _fileData;
|
||||||
private ESteps _steps = ESteps.None;
|
private ESteps _steps = ESteps.None;
|
||||||
private int RequestCount = 0;
|
private int _requestCount = 0;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 加载的清单实例
|
/// 加载的清单实例
|
||||||
|
@ -39,7 +39,7 @@ namespace YooAsset
|
||||||
}
|
}
|
||||||
internal override void Start()
|
internal override void Start()
|
||||||
{
|
{
|
||||||
RequestCount = RequestHelper.GetRequestFailedCount(_packageName, nameof(LoadRemoteManifestOperation));
|
_requestCount = RequestHelper.GetRequestFailedCount(_packageName, nameof(LoadRemoteManifestOperation));
|
||||||
_steps = ESteps.DownloadPackageHashFile;
|
_steps = ESteps.DownloadPackageHashFile;
|
||||||
}
|
}
|
||||||
internal override void Update()
|
internal override void Update()
|
||||||
|
@ -142,7 +142,7 @@ namespace YooAsset
|
||||||
private string GetDownloadRequestURL(string fileName)
|
private string GetDownloadRequestURL(string fileName)
|
||||||
{
|
{
|
||||||
// 轮流返回请求地址
|
// 轮流返回请求地址
|
||||||
if (RequestCount % 2 == 0)
|
if (_requestCount % 2 == 0)
|
||||||
return _remoteServices.GetRemoteMainURL(fileName);
|
return _remoteServices.GetRemoteMainURL(fileName);
|
||||||
else
|
else
|
||||||
return _remoteServices.GetRemoteFallbackURL(fileName);
|
return _remoteServices.GetRemoteFallbackURL(fileName);
|
||||||
|
|
|
@ -16,7 +16,7 @@ namespace YooAsset
|
||||||
private readonly int _timeout;
|
private readonly int _timeout;
|
||||||
private UnityWebDataRequester _downloader;
|
private UnityWebDataRequester _downloader;
|
||||||
private ESteps _steps = ESteps.None;
|
private ESteps _steps = ESteps.None;
|
||||||
private int RequestCount = 0;
|
private int _requestCount = 0;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 包裹哈希值
|
/// 包裹哈希值
|
||||||
|
@ -33,7 +33,7 @@ namespace YooAsset
|
||||||
}
|
}
|
||||||
internal override void Start()
|
internal override void Start()
|
||||||
{
|
{
|
||||||
RequestCount = RequestHelper.GetRequestFailedCount(_packageName, nameof(QueryRemotePackageHashOperation));
|
_requestCount = RequestHelper.GetRequestFailedCount(_packageName, nameof(QueryRemotePackageHashOperation));
|
||||||
_steps = ESteps.DownloadPackageHash;
|
_steps = ESteps.DownloadPackageHash;
|
||||||
}
|
}
|
||||||
internal override void Update()
|
internal override void Update()
|
||||||
|
@ -89,7 +89,7 @@ namespace YooAsset
|
||||||
string url;
|
string url;
|
||||||
|
|
||||||
// 轮流返回请求地址
|
// 轮流返回请求地址
|
||||||
if (RequestCount % 2 == 0)
|
if (_requestCount % 2 == 0)
|
||||||
url = _remoteServices.GetRemoteMainURL(fileName);
|
url = _remoteServices.GetRemoteMainURL(fileName);
|
||||||
else
|
else
|
||||||
url = _remoteServices.GetRemoteFallbackURL(fileName);
|
url = _remoteServices.GetRemoteFallbackURL(fileName);
|
||||||
|
|
|
@ -16,7 +16,7 @@ namespace YooAsset
|
||||||
private readonly int _timeout;
|
private readonly int _timeout;
|
||||||
private UnityWebDataRequester _downloader;
|
private UnityWebDataRequester _downloader;
|
||||||
private ESteps _steps = ESteps.None;
|
private ESteps _steps = ESteps.None;
|
||||||
private int RequestCount = 0;
|
private int _requestCount = 0;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 包裹版本
|
/// 包裹版本
|
||||||
|
@ -33,7 +33,7 @@ namespace YooAsset
|
||||||
}
|
}
|
||||||
internal override void Start()
|
internal override void Start()
|
||||||
{
|
{
|
||||||
RequestCount = RequestHelper.GetRequestFailedCount(_packageName, nameof(QueryRemotePackageVersionOperation));
|
_requestCount = RequestHelper.GetRequestFailedCount(_packageName, nameof(QueryRemotePackageVersionOperation));
|
||||||
_steps = ESteps.DownloadPackageVersion;
|
_steps = ESteps.DownloadPackageVersion;
|
||||||
}
|
}
|
||||||
internal override void Update()
|
internal override void Update()
|
||||||
|
@ -89,7 +89,7 @@ namespace YooAsset
|
||||||
string url;
|
string url;
|
||||||
|
|
||||||
// 轮流返回请求地址
|
// 轮流返回请求地址
|
||||||
if (RequestCount % 2 == 0)
|
if (_requestCount % 2 == 0)
|
||||||
url = _remoteServices.GetRemoteMainURL(fileName);
|
url = _remoteServices.GetRemoteMainURL(fileName);
|
||||||
else
|
else
|
||||||
url = _remoteServices.GetRemoteFallbackURL(fileName);
|
url = _remoteServices.GetRemoteFallbackURL(fileName);
|
||||||
|
|
Loading…
Reference in New Issue