<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "USDKit",
  "identifier" : "/documentation/USDKit/USDPrim/VariantSetCollection/subscript(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Subscript",
  "symbol" : {
    "kind" : "Instance Subscript",
    "modules" : [
      "USDKit"
    ],
    "preciseIdentifier" : "s:6USDKit7USDPrimV20VariantSetCollectionVyAC0cD0VSgSScip"
  },
  "title" : "subscript(_:)"
}
-->

# subscript(_:)

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

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

## Parameters

`name`

The name of the variant set.

## Return Value

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

---

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)