---
title: "subscript(_:)"
framework: usdkit
role: symbol
role_heading: Instance Subscript
platforms: [iOS 27.0+, iPadOS 27.0+, Mac Catalyst 27.0+, macOS 27.0+, tvOS 27.0+, visionOS 27.0+]
path: "usdkit/usdprim/variantsetcollection/subscript(_:)"
---

# subscript(_:)

Returns the variant set with the specified name, or nil if no variant set with that name exists on the prim.

## Declaration

```swift
subscript(name: String) -> USDPrim.VariantSet? { get }
```

## Parameters

- `name`: The name of the variant set.

## Return Value

Return Value The variant set, or nil if no variant set with that name exists on the prim.
