mirror of https://github.com/tuyoogame/YooAsset
parent
36c53e5d94
commit
b5df539392
|
@ -74,7 +74,7 @@ namespace YooAsset
|
|||
string savePath = PersistentTools.GetPersistent(_packageName).GetSandboxPackageManifestFilePath(_packageVersion);
|
||||
string fileName = YooAssetSettingsData.GetManifestBinaryFileName(_packageName, _packageVersion);
|
||||
string webURL = GetDownloadRequestURL(fileName);
|
||||
YooLogger.Log($"Beginning to download manifest file : {webURL}");
|
||||
YooLogger.Log($"Beginning to download package manifest file : {webURL}");
|
||||
_downloader2 = new UnityWebFileRequester();
|
||||
_downloader2.SendRequest(webURL, savePath, _timeout);
|
||||
}
|
||||
|
|
|
@ -58,6 +58,7 @@ namespace YooAsset
|
|||
private enum ESteps
|
||||
{
|
||||
None,
|
||||
CheckParams,
|
||||
CheckActiveManifest,
|
||||
TryLoadCacheManifest,
|
||||
DownloadManifest,
|
||||
|
@ -87,13 +88,34 @@ namespace YooAsset
|
|||
}
|
||||
internal override void Start()
|
||||
{
|
||||
_steps = ESteps.CheckActiveManifest;
|
||||
_steps = ESteps.CheckParams;
|
||||
}
|
||||
internal override void Update()
|
||||
{
|
||||
if (_steps == ESteps.None || _steps == ESteps.Done)
|
||||
return;
|
||||
|
||||
if (_steps == ESteps.CheckParams)
|
||||
{
|
||||
if (string.IsNullOrEmpty(_packageName))
|
||||
{
|
||||
_steps = ESteps.Done;
|
||||
Status = EOperationStatus.Failed;
|
||||
Error = "Package name is null or empty.";
|
||||
return;
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(_packageVersion))
|
||||
{
|
||||
_steps = ESteps.Done;
|
||||
Status = EOperationStatus.Failed;
|
||||
Error = "Package version is null or empty.";
|
||||
return;
|
||||
}
|
||||
|
||||
_steps = ESteps.CheckActiveManifest;
|
||||
}
|
||||
|
||||
if (_steps == ESteps.CheckActiveManifest)
|
||||
{
|
||||
// 检测当前激活的清单对象
|
||||
|
@ -198,6 +220,7 @@ namespace YooAsset
|
|||
private enum ESteps
|
||||
{
|
||||
None,
|
||||
CheckParams,
|
||||
CheckActiveManifest,
|
||||
LoadRemoteManifest,
|
||||
Done,
|
||||
|
@ -220,13 +243,34 @@ namespace YooAsset
|
|||
}
|
||||
internal override void Start()
|
||||
{
|
||||
_steps = ESteps.CheckActiveManifest;
|
||||
_steps = ESteps.CheckParams;
|
||||
}
|
||||
internal override void Update()
|
||||
{
|
||||
if (_steps == ESteps.None || _steps == ESteps.Done)
|
||||
return;
|
||||
|
||||
if (_steps == ESteps.CheckParams)
|
||||
{
|
||||
if (string.IsNullOrEmpty(_packageName))
|
||||
{
|
||||
_steps = ESteps.Done;
|
||||
Status = EOperationStatus.Failed;
|
||||
Error = "Package name is null or empty.";
|
||||
return;
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(_packageVersion))
|
||||
{
|
||||
_steps = ESteps.Done;
|
||||
Status = EOperationStatus.Failed;
|
||||
Error = "Package version is null or empty.";
|
||||
return;
|
||||
}
|
||||
|
||||
_steps = ESteps.CheckActiveManifest;
|
||||
}
|
||||
|
||||
if (_steps == ESteps.CheckActiveManifest)
|
||||
{
|
||||
// 检测当前激活的清单对象
|
||||
|
|
Loading…
Reference in New Issue