---
title: "material(named:)"
framework: scenekit
role: symbol
role_heading: Instance Method
path: "scenekit/scngeometry/material(named:)"
---

# material(named:)

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

## Declaration

```swift
func material(named name: String) -> SCNMaterial?
```

## Parameters

- `name`: The name of the material to be retrieved.

## Return Value

Return Value A material object with the specified name.

## Discussion

Discussion 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

- [materials](scenekit/scngeometry/materials.md)
- [firstMaterial](scenekit/scngeometry/firstmaterial.md)
- [insertMaterial(_:at:)](scenekit/scngeometry/insertmaterial(_:at:).md)
- [removeMaterial(at:)](scenekit/scngeometry/removematerial(at:).md)
- [replaceMaterial(at:with:)](scenekit/scngeometry/replacematerial(at:with:).md)
