Instance Method


Recursively searches all descendant entities for one with the given name.


func findEntity(named name: String) -> Entity?



The entity name for which to search.

Return Value

An entity with the given name, or nil if no entity is found.


The findEntity(named:) method conducts a depth-first, recursive search over all of the entity’s descendants for one whose name property matches the given name. The method returns the first match. Entity names need not be unique.

See Also

Identifying an Entity

var scene: Scene?

The scene that owns the entity.

var name: String

The name of the entity.

var id: ObjectIdentifier

The stable identity of the entity associated with self.

var id: UInt64

The stable identity of the entity.

typealias Entity.ID

A type of unique identifier used for an entity.