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

# subscript(_:_:)

Accesses a body material by name, returning nil if the name is absent or the material is not a body material.

## Declaration

```swift
subscript(name: String, type: ClothBodyMaterial.Type) -> ClothBodyMaterial? { get set }
```
