Loads and returns all objects in the scene source that pass the test in a given block.
- iOS 8.0+
- macOS 10.9+
- Mac Catalyst 13.0+Beta
- tvOS 9.0+
- watchOS 2.0+
The block to be applied to each object in the scene source.
The block takes three parameters:
The object to be tested.
The unique identifier of the object in the scene source.
A reference to a Boolean value. Set
YESwithin the block to abort further processing of the scene source’s contents.
The block returns a Boolean value indicating whether the entry object passed the test and should be included in the method’s returned array.
An array of SceneKit objects from the scene source that pass the test.
SceneKit recognizes objects of the following classes in scene files:
Each object in a scene file has an identifier that is unique for its class. These identifiers are determined by the software that created the scene file—for example, they may be descriptive names assigned by an artist using 3D authoring tools. For SceneKit classes with a
name property (such as nodes and geometries), the name of an object loaded from a scene file is based on its identifier in the scene file.
Use this method to selectively load objects from a scene source matching criteria you specify. For example, the following code loads from a scene file only the nodes that have attached geometry: