//注:this.pool是一个map集合类,我在本类里做的缓存池
//这样报错 Internal error, should not remove unknown node from parent.
var prefabInstance = layout._children;
var newArr = [];
var node;
while (node = prefabInstance.shift()){
// var node = prefabInstance.shift();
node.parent = null;
newArr.push(node);
}
this.pool.set(childName + "_prefab", newArr);
//另一种for循环 然后逐个设置parent = null ,但是不生效,设置不成功,
//如果直接从父节点removeAllChildren,this.pool里面的值会全部消失 ,数组会被清空
求各位大神的解决方案