原生环境粒子加载异常

 1.异常日志

Simulator: D/jswrapper (145): JS:Uncaught SyntaxError: Unexpected token } in JSON at position 2896
Simulator: D/jswrapper (145): JS:[0]loadPlist@src/jsb_polyfill.js:12719
Simulator: [1]95.Loader.handle@src/jsb_polyfill.js:12758
Simulator: [2]flow@src/jsb_polyfill.js:13223
Simulator: [3]flow@src/jsb_polyfill.js:13241
Simulator: [4]flow@src/jsb_polyfill.js:13241
Simulator: [5]99.proto.flowIn@src/jsb_polyfill.js:13296
Simulator: [6]96.proto.append@src/jsb_polyfill.js:12963
Simulator: [7]89.proto.flowInDeps@src/jsb_polyfill.js:11982
Simulator: [8]loadDepends@src/jsb_polyfill.js:13531
Simulator: [9]loadUuid@src/jsb_polyfill.js:13614
Simulator: [10]95.Loader.handle@src/jsb_polyfill.js:12758
Simulator: [11]flow@src/jsb_polyfill.js:13223
Simulator: [12]flow@src/jsb_polyfill.js:13241
Simulator: [13]anonymous@src/jsb_polyfill.js:13231
Simulator: [14]anonymous@src/jsb_polyfill.js:12273
Simulator: [15]queryAssetInfo@src/jsb_polyfill.js:16085
Simulator: [16]90.AssetLoader.handle@src/jsb_polyfill.js:12246
Simulator: [17]flow@src/jsb_polyfill.js:13223
Simulator: [18]99.proto.flowIn@src/jsb_polyfill.js:13296
Simulator: [19]96.proto.append@src/jsb_polyfill.js:12963

2.复现方式
原生环境中打开有cc.ParticleSystem组件的页面,该组件上file属性有值,并且file属性挂的粒子文件没有textureUuid的值(即没有下图中红框中的内容)

 

3.修复方式

编辑粒子特效时添加texture属性的值,然后重新导出该粒子文件

拓展:

CocosCreator中,ParticleSystem组件勾选custom时无论file属性是否有值都会按照custom下面的配置播放粒子效果。custom没有勾选时按照file挂的粒子文件播放。

推荐使用file文件播放粒子效果,有使用custom的可以直接点击其旁边的“导出”按钮导出成粒子文件(导出的文件会自动挂到ParticleSystem组件上并关闭custom)

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值