Contents

name

A name associated with the node.

Declaration

var name: String? { get set }

Discussion

You can provide a descriptive name for a node to make managing your scene graph easier. Nodes loaded from a scene file may have names assigned by an artist using a 3D authoring tool. Use the childNode(withName:recursively:) or childNodes(passingTest:) method to retrieve a node from a scene graph by its name, or the SCNSceneSource class to examine nodes in a scene file without loading its scene graph.

The names of nodes and their attached objects are saved when you export a scene to a file using its write(to:options:delegate:progressHandler:) method, and appear in the Xcode scene editor. The SceneKit statistics view (see showsStatistics) also shows the names of nodes with attached cameras.

See Also

Related Documentation

Managing Node Content