update yooasset2.0

pull/189/head
hevinci 2023-09-25 10:41:58 +08:00
parent e358bbf46c
commit e207d834bd
6 changed files with 10 additions and 10 deletions

View File

@ -4,7 +4,7 @@ using System.Collections.Generic;
namespace YooAsset
{
public class RemoteTools
public class RequestHelper
{
/// <summary>
/// 记录网络请求失败事件的次数

View File

@ -29,7 +29,7 @@ namespace YooAsset
}
internal override void Start()
{
RequestCount = RemoteTools.GetRequestFailedCount(_persistent.PackageName, nameof(DownloadManifestOperation));
RequestCount = RequestHelper.GetRequestFailedCount(_persistent.PackageName, nameof(DownloadManifestOperation));
_steps = ESteps.DownloadPackageHashFile;
}
internal override void Update()
@ -58,7 +58,7 @@ namespace YooAsset
_steps = ESteps.Done;
Status = EOperationStatus.Failed;
Error = _downloader1.GetError();
RemoteTools.RecordRequestFailed(_persistent.PackageName, nameof(DownloadManifestOperation));
RequestHelper.RecordRequestFailed(_persistent.PackageName, nameof(DownloadManifestOperation));
}
else
{
@ -89,7 +89,7 @@ namespace YooAsset
_steps = ESteps.Done;
Status = EOperationStatus.Failed;
Error = _downloader2.GetError();
RemoteTools.RecordRequestFailed(_persistent.PackageName, nameof(DownloadManifestOperation));
RequestHelper.RecordRequestFailed(_persistent.PackageName, nameof(DownloadManifestOperation));
}
else
{

View File

@ -39,7 +39,7 @@ namespace YooAsset
}
internal override void Start()
{
RequestCount = RemoteTools.GetRequestFailedCount(_packageName, nameof(LoadRemoteManifestOperation));
RequestCount = RequestHelper.GetRequestFailedCount(_packageName, nameof(LoadRemoteManifestOperation));
_steps = ESteps.DownloadPackageHashFile;
}
internal override void Update()
@ -90,7 +90,7 @@ namespace YooAsset
_steps = ESteps.Done;
Status = EOperationStatus.Failed;
Error = _downloader.GetError();
RemoteTools.RecordRequestFailed(_packageName, nameof(LoadRemoteManifestOperation));
RequestHelper.RecordRequestFailed(_packageName, nameof(LoadRemoteManifestOperation));
}
else
{

View File

@ -33,7 +33,7 @@ namespace YooAsset
}
internal override void Start()
{
RequestCount = RemoteTools.GetRequestFailedCount(_packageName, nameof(QueryRemotePackageHashOperation));
RequestCount = RequestHelper.GetRequestFailedCount(_packageName, nameof(QueryRemotePackageHashOperation));
_steps = ESteps.DownloadPackageHash;
}
internal override void Update()
@ -62,7 +62,7 @@ namespace YooAsset
_steps = ESteps.Done;
Status = EOperationStatus.Failed;
Error = _downloader.GetError();
RemoteTools.RecordRequestFailed(_packageName, nameof(QueryRemotePackageHashOperation));
RequestHelper.RecordRequestFailed(_packageName, nameof(QueryRemotePackageHashOperation));
}
else
{

View File

@ -33,7 +33,7 @@ namespace YooAsset
}
internal override void Start()
{
RequestCount = RemoteTools.GetRequestFailedCount(_packageName, nameof(QueryRemotePackageVersionOperation));
RequestCount = RequestHelper.GetRequestFailedCount(_packageName, nameof(QueryRemotePackageVersionOperation));
_steps = ESteps.DownloadPackageVersion;
}
internal override void Update()
@ -62,7 +62,7 @@ namespace YooAsset
_steps = ESteps.Done;
Status = EOperationStatus.Failed;
Error = _downloader.GetError();
RemoteTools.RecordRequestFailed(_packageName, nameof(QueryRemotePackageVersionOperation));
RequestHelper.RecordRequestFailed(_packageName, nameof(QueryRemotePackageVersionOperation));
}
else
{