Unity之Assetbundle打包出错:Editor only objects cannot be included in AssetBundles;or can‘t be loaded

问题一: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,请不吝赐教

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

avi9111

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值