分别在2.4.11和3.7.2上创建了一个100x100的空白图片预制体,然后在场景上添加了50000个实例。帧数为什么会差这么多?
代码:
const { ccclass, property } = cc._decorator;
@ccclass
export default class NewClass extends cc.Component {
@property(cc.Prefab)
prefab: cc.Prefab = null;
start() {
for (let index = 0; index < 50000; index++) {
const node = cc.instantiate(this.prefab);
this.node.addChild(node);
}
}
}






