问题一:Editor only objects cannot be included in AssetBundles
又双叒是Assetbundle的问题
主要问题还是 Lightmap.asset的问题(unity2017的lightmap文件也有问题??)
出现这个提示原因:
gz_xxx.scene 有标记assetbundle
而 gz_xx 目录(放lightmap的目录)没标记,则不会打包进 assetbundle
所以囧有 lightmap 这个 .asset 文件仅在 editor 生效的提示
解决方法:
暂时不知道
问题二:can't be loaded because it was not built with the right version or build target.
The file can not be loaded because it was created for another build target that is not compatible with this platform.
Please make sure to build AssetBundles using the build target platform that it is used by.
File's Build target is: 13
zu最终破案了,
还给我提示 target == 13?
// WWW www = WWW.LoadFromCacheOrDownload(path,0);
WWW www = new WWW(path);
最终发现,根本和版本什么的没关系(已经用了多个打包ab的方法,打包均是正确的)
问题出在加载ab方法的第二个参数,LoadFromCacheOrDownload 的第二个参数,设置了version==0 , 打包可能version >0
官方的鸡肋方法真的不要乱用
问题三:确实是打包,打ab包时候的问题
The file can not be loaded because it was created for another build target that is not compatible with this platform.
Please make sure to build AssetBundles using the build target platform that it is used by.
File's Build target is: 9
这是强行报错的提示,如果有知道怎么能查看 ab 文件的build target,请不吝赐教