creator版本: 2.0.5
测试代码如下,逻辑并不复杂,只是走了一个极端情况
onClick() {
let size = cc.view.getDesignResolutionSize();
for (let i = 0; i < 1000; i++) {
let node = cc.instantiate(this.prefab);
node.x = Math.random() * size.width - size.width / 2;
node.y = Math.random() * size.height - size.height / 2;
this.node.addChild(node);
this._num++;
this.numLabel.string = this._num;
}
},
当数量达到一个临界值的时候,就出现了这种情况