Post not yet marked as solved
Post marked as unsolved with 3 replies, 929 views
I'm trying to optimize the draw calls in an existing scene with flattenedClone(). From what I can tell enumerateChildNodes would be a good way to go through the scene tree and add the nodes to be flattened to a parent node.
I saw something like this in a tutorial but it is saying that 'withName' is an extra argument.
gameScene.rootNode.enumerateChildNodes(withName: "//*"){ (node, stop) in
if (node.name == "Large Tree"){
flattenParent.addChildNode(node)
node.removeFromParentNode()
}
}
any guidance on this usage? Also would a switch statement or multiple || be optimal when searching through several different mesh nodes?