Subscript

subscript(_:)

Returns an array of nodes that match the name parameter.

Declaration

subscript(name: String) -> [SKNode] { get }

Parameters

name

The name to search for. This may be either the literal name of the node or a customized search string. See Searching the Node Tree.

Return Value

An array of SKNode objects that match the name. If no matching nodes are found, an empty array is returned.

See Also

Naming Nodes

func childNode(withName: String)

Searches the children of the receiving node for a node with a specific name.

func enumerateChildNodes(withName: String, using: (SKNode, UnsafeMutablePointer<ObjCBool>) -> Void)

Search the children of the receiving node to perform processing for nodes which share a name.

var name: String?

The node’s assignable name.