参考资料1里面这样一句话很重要。
StreamingAssets
StreamingAssets和Resources很像。同样作为一个只读的Unity3D的保留文件夹出现。不过两者也有很大的区别,那就是Resources文件夹中的内容在打包时会被压缩和加密。而StreamingAsset文件夹中的内容则会原封不动的打入包中,因此StreamingAssets主要用来存放一些二进制文件。
特点:
只读不可写。主要用来存放二进制文件。只能用过WWW类来读取。
...
public AssetBundle getAB(string path)
{
AssetBundle ab = null;
StartCoroutine(LoadAB(path));
return ab;
}
IEnumerator LoadAB(string abPath)
{
Debug.Log(" addFGUIAB 2 " + abPath);
Debug.Log("!!! path = " + abPath);
//UnityWebRequest www = UnityWebRequest.Get(path);
//www.SendWebRequest();
string desc = "_desc";
string res = "_res";
string descPath = abPath + desc;
string resPath = abPath + res;
AssetBundle ab_1 = null;
using (WWW www = new WWW(descPath))
{
Debug.Log("!!! www.1");
//yield retur

本文介绍了Unity中StreamingAssets文件夹的特性,它包含的资源在打包时不被压缩,适合存放二进制文件。文章重点讲解如何通过WWW类读取该文件夹内的AB包,提供了一个参考资料聚焦于在Android平台上读取AssetBundle的方法。
最低0.47元/天 解锁文章
9121

被折叠的 条评论
为什么被折叠?



