Method SetVariantSelection
SetVariantSelection(GameObject, string, Dictionary<string, string>)
Sets the variant selections in USD at the given prim path based on the selections parameter.
Declaration
public void SetVariantSelection(GameObject go, string usdPrimPath, Dictionary<string, string> selections)
Parameters
Type | Name | Description |
---|---|---|
GameObject | go | The gameObject at the root of the variant set. |
string | usdPrimPath | The USD prim at which to set the variant selection. |
Dictionary<string, string> | selections | A collection of (variant set, selection) pairs. |
Remarks
A USD prim can have zero or more variant sets, for example a single prim amy have "modelingVariant" and "shadingVariant" sets. Each set can have their own slection.
Examples
If two sets with selections are modelingVariant=CupWithHandle and shadingVariant=BrightBlue, resulting in a bright blue cup with a handle. In this example, the selections dictionary would contain: { "modelingVariant" = "CupWithHandle", "shadingVariant" = "BrightBlue" }