---
title: "subscript(_:)"
framework: realitykit
role: symbol
role_heading: Instance Subscript
path: "realitykit/clothsimulationcomponent/materialcollection/subscript(_:)"
---

# subscript(_:)

Accesses the material with the given name, returning nil if no material with that name exists.

## Declaration

```swift
subscript(name: String) -> ClothSimulationComponent.Material? { get set }
```
