Instance Method


Returns the first material attached to the geometry with the specified name.


- (SCNMaterial *)materialWithName:(NSString *)name;



The name of the material to be retrieved.

Return Value

A material object with the specified name.


You can use the name property of each SCNMaterial object to make managing your scene graph easier. Materials loaded from a scene file may have names assigned by an artist using a 3D authoring tool.

If a geometry has multiple materials attached with the same name, this method returns the first according to the order of the materials array.

See Also

Managing a Geometry’s Materials


An array of SCNMaterial objects that determine the geometry’s appearance when rendered.


The first material attached to the geometry.

- insertMaterial:atIndex:

Attaches a material to the geometry at the specified index.

- removeMaterialAtIndex:

Removes a material attached to the geometry.

- replaceMaterialAtIndex:withMaterial:

Replaces a material attached to the geometry with another.

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