如题
PS. cocos creator能找到的材料实在太少了!!!!
如题
PS. cocos creator能找到的材料实在太少了!!!!
是用cc.game.addPersistRootNode(this.node);吗?
设置完用console.log("is Persist node " + cc.game.isPersistRootNode(this.node) ); 返回还是false
在新的scene获取所有的children好像没有
var children = cc.director.getScene().getChildren();
console.log("children name is ");
for (var index = 0; index < children.length; index ++){
console.log(children.name);
}
查看发现没有之前的node啊
cc.game.addPersistRootNode(this.node);的前提是这个节点(this.node)在层级结构和canvas平级,试一下吧
哈哈 解决了,确实只要放在和Canvas平级就可以了
困扰我多日的问题终于解决了,谢谢