测试机型:ipx
测试语句:
tool.loadResPrefab(‘Model/ISLAND/’ + name + ‘_island’, function (prefab) {
let n = cc.instantiate(prefab);
n.name = uuid + name;
n.setPosition(cc.v3(pos.x, pos.y, 0));
n.parent = cc.find(‘Canvas/ISLANDS_UTIL’)
})
//确定是n.parent = cc.find(‘Canvas/ISLANDS_UTIL’)这一句导致的卡死
先将fbx做成prefab。
当动态加载顶点数几千+的prefab时,addchild到场景时会卡住几秒(根据顶点数量),在这之后,反复添加此prefab到场景,都不会卡死了。
换一个fbx动态加载,第一次加载到场景依然会卡几秒。
就是说每一个fbx第一次添加到场景,都会导致游戏卡死几秒
测试几百个顶点的fbx不会出现






