---
title: "setVariantSelection(for:to:)"
framework: usdkit
role: symbol
role_heading: Instance Method
path: "usdkit/usdprim/spec/setvariantselection(for:to:)"
---

# setVariantSelection(for:to:)

Sets the variant selection for the given variant set.

## Declaration

```swift
func setVariantSelection(for setName: USDToken, to variantName: USDToken)
```

## Parameters

- `setName`: The variant set to update.
- `variantName`: The variant to select.
