未验证 提交 e0957bec 编写于 作者: 小菜希 提交者: GitHub

在Android端读取这个文件夹时,只能使用WWW进行异步读取,而在ios和pc上则可以使用File类及其他同步读取方式。 (#237)

上级 176a7637
...@@ -385,8 +385,9 @@ namespace ET ...@@ -385,8 +385,9 @@ namespace ET
if (!Define.IsAsync) if (!Define.IsAsync)
{ {
string[] realPath = null;
#if UNITY_EDITOR #if UNITY_EDITOR
string[] realPath = null;
realPath = AssetDatabase.GetAssetPathsFromAssetBundle(assetBundleName); realPath = AssetDatabase.GetAssetPathsFromAssetBundle(assetBundleName);
foreach (string s in realPath) foreach (string s in realPath)
{ {
...@@ -542,11 +543,13 @@ namespace ET ...@@ -542,11 +543,13 @@ namespace ET
p = Path.Combine(PathHelper.AppResPath, assetBundleName); p = Path.Combine(PathHelper.AppResPath, assetBundleName);
} }
if (!File.Exists(p)) Log.Info("Async load bundle BundleName : " + p);
{
Log.Error("Async load bundle not exist! BundleName : " + p); // if (!File.Exists(p))
return null; // {
} // Log.Error("Async load bundle not exist! BundleName : " + p);
// return null;
// }
assetBundle = await AssetBundleHelper.UnityLoadBundleAsync(p); assetBundle = await AssetBundleHelper.UnityLoadBundleAsync(p);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册