Instance Method

identifiersOfEntriesWithClass:

Returns the identifiers for all objects in the scene source of the specified class.

Declaration

- (NSArray<NSString *> *)identifiersOfEntriesWithClass:(Class)entryClass;

Parameters

entryClass

The class of objects to find identifiers for.

Return Value

An array of NSString objects, each the unique identifier of an object in the scene source.

Discussion

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 enumerate all objects in a scene file of a specified class without loading the objects and their content. For example, the following code finds the identifiers for all animations stored in a scene source:

NSArray *animations = [sceneSource identifiersOfEntriesWithClass:[CAAnimation class]];

See Also

Loading and Inspecting Scene Elements

- entryWithIdentifier:withClass:

Loads and returns a specific object in the scene source.

- entriesPassingTest:

Loads and returns all objects in the scene source that pass the test in a given block.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software