<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/ClothSimulationComponent/MaterialCollection",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:22RealityFoundationCloth0C19SimulationComponentV18MaterialCollectionV"
  },
  "title" : "ClothSimulationComponent.MaterialCollection"
}
-->

# ClothSimulationComponent.MaterialCollection

A collection of materials.

```
struct MaterialCollection
```

## Topics

### Accessing materials

[`subscript(String, ClothBodyMaterial.Type) -> ClothBodyMaterial?`](/documentation/RealityKit/ClothSimulationComponent/MaterialCollection/subscript(_:_:)-49wu)

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

[`subscript(String, ClothColliderMaterial.Type) -> ClothColliderMaterial?`](/documentation/RealityKit/ClothSimulationComponent/MaterialCollection/subscript(_:_:)-8ncq4)

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

### Removing materials

[`func remove(name: String)`](/documentation/RealityKit/ClothSimulationComponent/MaterialCollection/remove(name:))

### Subscripts

[`subscript(String) -> ClothSimulationComponent.Material?`](/documentation/RealityKit/ClothSimulationComponent/MaterialCollection/subscript(_:))

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

[`subscript(_:_:)`](/documentation/RealityKit/ClothSimulationComponent/MaterialCollection/subscript(_:_:))

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

## Relationships

### Conforms To

[`Sendable`](/documentation/Swift/Sendable)

[`Collection`](/documentation/Swift/Collection)

[`Sequence`](/documentation/Swift/Sequence)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)