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

# add(_:)

Adds a new variant set to the prim.

## Declaration

```swift
@discardableResult func add(_ variantSetName: String) throws -> USDPrim.VariantSet
```

## Parameters

- `variantSetName`: The name of the variant set to add.

## Return Value

Return Value The newly added variant set.

## Discussion

Discussion note: An error if the variant set cannot be added.
