---
title: "subscript(_:)"
framework: realitykit
role: symbol
role_heading: Instance Subscript
path: "realitykit/entity/componentset/subscript(_:)-47rhg"
---

# subscript(_:)

Gets or sets the component with a specific dynamically supplied type.

## Declaration

```swift
@MainActor @preconcurrency subscript(componentType: any Component.Type) -> (any Component)? { get set }
```

## See Also

### Accessing members

- [subscript(_:)](realitykit/entity/componentset/subscript(_:)-5wdsf.md)
