今天学习Unity3d AssetBundle的内容,对于已经打好的AssetBundle,用WWW.LoadFromCacheOrDownload()能正常加载到游戏中,在看完雨松文章后改成AssetBundle.CreateFromFile()缺加载失败;原因就在于 这个path路径问题;
【路径区别】一个需要"file://",一个不需要;
1.WWW.LoadFromCacheOrDownload() 路径为:"file://" + Application.dataPath + "/StreamingAssets/"+ "Sphere.assetbundle"
2.AssetBundle.CreateFromFile() 路径为:Application.dataPath + "/StreamingAssets/" + "Sphere.assetbundle"
感谢这个帖子:http://tieba.baidu.com/p/3476103759。
记录下,希望碰到一样问题的新手能有所帮助!