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 namespace YooAsset
{ {
public class RemoteTools public class RequestHelper
{ {
/// <summary> /// <summary>
/// 记录网络请求失败事件的次数 /// 记录网络请求失败事件的次数

View File

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

View File

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

View File

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

View File

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