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

# subscript(_:_:)

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

## Declaration

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

## See Also

### Accessing materials

- [subscript(_:_:)](realitykit/clothsimulationcomponent/materialcollection/subscript(_:_:)-49wu.md)
