update runtime code

1. 新增WebGL专属模式WebPlayMode
This commit is contained in:
hevinci
2023-07-18 14:27:33 +08:00
parent 9dd7680457
commit 0c1efe7420
40 changed files with 1616 additions and 554 deletions

View File

@@ -47,11 +47,6 @@ namespace YooAsset
_steps = ESteps.Website;
FileLoadPath = MainBundleInfo.Bundle.CachedDataFilePath;
}
else if (MainBundleInfo.LoadMode == BundleInfo.ELoadMode.LoadFromCache)
{
_steps = ESteps.CheckFile;
FileLoadPath = MainBundleInfo.Bundle.CachedDataFilePath;
}
else
{
throw new System.NotImplementedException(MainBundleInfo.LoadMode.ToString());
@@ -62,7 +57,8 @@ namespace YooAsset
if (_steps == ESteps.Download)
{
int failedTryAgain = Impl.DownloadFailedTryAgain;
_downloader = DownloadSystem.BeginDownload(MainBundleInfo, failedTryAgain);
_downloader = DownloadSystem.CreateDownload(MainBundleInfo, failedTryAgain);
_downloader.SendRequest();
_steps = ESteps.CheckDownload;
}
@@ -91,7 +87,8 @@ namespace YooAsset
{
int failedTryAgain = Impl.DownloadFailedTryAgain;
var bundleInfo = ManifestTools.ConvertToUnpackInfo(MainBundleInfo.Bundle);
_website = DownloadSystem.BeginDownload(bundleInfo, failedTryAgain);
_website = DownloadSystem.CreateDownload(bundleInfo, failedTryAgain);
_website.SendRequest();
_steps = ESteps.CheckWebsite;
}