[engine] 修复 Spine 动态合图未判断 attachment 是否存在 region 对象报错的问题

This commit is contained in:
SmallMain 2022-07-12 11:44:01 +08:00
parent a2404dae86
commit 5c72a79a02

View File

@ -325,6 +325,7 @@ export default class SpineAssembler extends Assembler {
} }
} else { } else {
const region = attachment.region; const region = attachment.region;
if (region) {
const alreadyInAtlas = !!region._original; const alreadyInAtlas = !!region._original;
if (alreadyInAtlas) { if (alreadyInAtlas) {
@ -369,6 +370,7 @@ export default class SpineAssembler extends Assembler {
} }
} }
} }
}
_tmpRegionData.reset(); _tmpRegionData.reset();
_packedRegions.length = 0; _packedRegions.length = 0;