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

# subscript(_:_:)

Gets or sets the component of the specified type.

## Declaration

```swift
@MainActor @preconcurrency subscript<T>(componentType: T.Type, backDeploy: Void = ()) -> T? where T : Component { get set }
```

## See Also

### Accessing components

- [subscript(componentType:)](realitykit/entity/componentset/subscript(componenttype:)-8y2jv.md)
