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
@@ -42,18 +42,17 @@ namespace YooAsset
BundleInfo IBundleServices.GetBundleInfo(string bundleName)
{
if (string.IsNullOrEmpty(bundleName))
return new BundleInfo(string.Empty, string.Empty);
return new BundleInfo(string.Empty);
if (AppPatchManifest.Bundles.TryGetValue(bundleName, out PatchBundle patchBundle))
{
string localPath = PathHelper.MakeStreamingLoadPath(patchBundle.Hash);
BundleInfo bundleInfo = new BundleInfo(patchBundle, localPath);
BundleInfo bundleInfo = new BundleInfo(patchBundle, BundleInfo.ELoadMode.LoadFromStreaming);
return bundleInfo;
}
else
{
YooLogger.Warning($"Not found bundle in patch manifest : {bundleName}");
BundleInfo bundleInfo = new BundleInfo(bundleName, string.Empty);
BundleInfo bundleInfo = new BundleInfo(bundleName);
return bundleInfo;
}
}