Update bundleInfo

修复原生文件拷贝目录不存导致的加载失败
完善原生文件异步加载接口
This commit is contained in:
hevinci
2022-04-18 15:08:39 +08:00
parent abb75fe858
commit b221b8121a
14 changed files with 214 additions and 155 deletions
@@ -37,19 +37,22 @@ namespace YooAsset
if (_steps == ESteps.None)
{
// 检测加载地址是否为空
if (string.IsNullOrEmpty(BundleFileInfo.LocalPath))
if (BundleFileInfo.LoadMode == BundleInfo.ELoadMode.None)
{
_steps = ESteps.Done;
Status = EStatus.Failed;
return;
}
if (string.IsNullOrEmpty(BundleFileInfo.RemoteMainURL))
_webURL = BundleFileInfo.LocalPath;
if (BundleFileInfo.LoadMode == BundleInfo.ELoadMode.LoadFromStreaming)
{
_steps = ESteps.LoadFile;
_webURL = BundleFileInfo.GetStreamingLoadPath();
}
else
_webURL = BundleFileInfo.RemoteMainURL;
_steps = ESteps.LoadFile;
{
throw new System.NotImplementedException(BundleFileInfo.LoadMode.ToString());
}
}
// 1. 从服务器或缓存中获取AssetBundle文件