Thank you for the reply. I tried doing something like this, it seems to find the node but regardless of wether I provide the name of the 3d mesh itself or its reference it throws a 'unexpectedy found nil which implicitly unwrapping an optional value' fatal error. Quite new to swift nomenclature and optionals etc, not really sure why it's getting nil if it does in fact find the node / reference.
gameScene.rootNode.enumerateChildNodes { (node, stop) in
if node.name == "SmallTree reference" {
print(node.name)
flattenParent.addChildNode(node)
// node.removeFromParentNode()
}
Topic:
Graphics & Games
SubTopic:
SceneKit
Tags: