One Logo Pool Ball
USDKit · IOS API REFERENCE

USDPrim.VariantSetCollection

struct · iOS 27.0+ · SDK 27.1

struct VariantSetCollection

Manages variant sets on a prim. Variants provide a way to package multiple variations of scene data within a single asset. A prim can have multiple variant sets, each containing named variants that can be selected at runtime.

Members (4)

get · iOS 27.0+

selections

TypeScript
get selections(): Record<string, string>
Swift declaration
var selections: [String : String] { get }

The composed variant selections on this prim, keyed by variant set name.

method · iOS 27.0+

add

TypeScript
add(variantSetName: string): USDPrim_VariantSet
Swift declaration
@discardableResult func add(_ variantSetName: String) throws -> USDPrim.VariantSet

Adds a new variant set to the prim. - Parameter variantSetName: The name of the variant set to add. - Returns: The newly added variant set. - Throws: An error if the variant set cannot be added.

get · iOS 27.0+

names

TypeScript
get names(): Array<string>
Swift declaration
var names: [String] { get }

The names of all variant sets on this prim.

subscript · iOS 27.0+

subscript

TypeScript
subscript(name: string): (USDPrim_VariantSet) | null
Swift declaration
subscript(name: String) -> USDPrim.VariantSet? { get }

Returns the variant set with the specified name, or `nil` if no variant set with that name exists on the prim. - Parameter name: The name of the variant set. - Returns: The variant set, or `nil` if no variant set with that name exists on the prim.

Skipped declarations

No declarations were skipped in this snapshot.

All USDKit types →