---
title: "subscript(_:as:)"
framework: usdkit
role: symbol
role_heading: Instance Subscript
path: "usdkit/usdprim/subscript(_:as:)"
---

# subscript(_:as:)

Access or modify the value of a named attribute on this prim.

## Declaration

```swift
subscript<T>(attributeName: USDToken, as type: T.Type) -> T? where T : USDPrim.Attribute.Value { get nonmutating set }
```

## See Also

### Accessing attributes

- [attributes](usdkit/usdprim/attributes.md)
- [authoredAttributes](usdkit/usdprim/authoredattributes.md)
- [attribute(named:)](usdkit/usdprim/attribute(named:).md)
- [attribute(at:)](usdkit/usdprim/attribute(at:).md)
- [hasAttribute(named:)](usdkit/usdprim/hasattribute(named:).md)
- [makeAttribute(named:as:custom:variability:)](usdkit/usdprim/makeattribute(named:as:custom:variability:).md)
- [USDPrim.Attribute](usdkit/usdprim/attribute.md)
