[0]SpineSkeleton3.8.loadAni如果加载失败一定会引发LAYA底层报错
使用的Spine3.8,因为是百分百能重现,所以就没有提供DEMO了。使用SpineSkeletonn3.8.loadAni如果加载失败时,laya.spine.js的SpineTemplet.loop会引发报错,,底层代码:
loop() {
if (this.assetManager.isLoadingComplete()) { //这里应该先判断加载是否成功,否则失败了也会满足条件
this.parseSpineAni();//在处理失败资源会报错
return;
}
if (this.assetManager.hasErrors()) {
this.event(Laya.Event.ERROR, "load failed:" + this.assetManager.getErrors());
return;
}
Laya.Laya.timer.frameOnce(1, this, this.loop);
}
loop() {
if (this.assetManager.isLoadingComplete()) { //这里应该先判断加载是否成功,否则失败了也会满足条件
this.parseSpineAni();//在处理失败资源会报错
return;
}
if (this.assetManager.hasErrors()) {
this.event(Laya.Event.ERROR, "load failed:" + this.assetManager.getErrors());
return;
}
Laya.Laya.timer.frameOnce(1, this, this.loop);
}
没有找到相关结果
已邀请:
要回复问题请先登录
1 个回复
Yan
赞同来自: