---
title: "subscript(_:)"
framework: modelio
role: symbol
role_heading: Instance Subscript
path: "modelio/mdlmaterial/subscript(_:)-323j3"
---

# subscript(_:)

Returns the material property with the specified name, for use with subscript syntax.

## Declaration

```swift
subscript(name: String) -> MDLMaterialProperty? { get }
```

## Parameters

- `name`: The doc://com.apple.modelio/documentation/ModelIO/MDLMaterialProperty/name value of a material property in the material.

## Return Value

Return Value The material property with the specified name, or nil if the material does not contain a material property with that name.

## Discussion

Discussion This method is equivalent to the propertyNamed(_:) method but allows for the use of subscript syntax for reading material properties. To write material properties to the material, use the setProperty(_:) method.

## See Also

### Accessing material properties with subscript syntax

- [subscript(_:)](modelio/mdlmaterial/subscript(_:)-19j2.md)
- [count](modelio/mdlmaterial/count.md)
