Class MaterialsVariantsControl
Allows switching the materials variant of a glTF scene instance.
Implements
Inherited Members
Namespace: GLTFast
Assembly: glTFast.dll
Syntax
public class MaterialsVariantsControl : IMaterialsVariantsProvider
Properties
MaterialsVariantsCount
Declaration
public int MaterialsVariantsCount { get; }
Property Value
Type | Description |
---|---|
int |
See Also
Methods
ApplyMaterialsVariantAsync(int, CancellationToken)
Applies a materials variant.
Declaration
public Task ApplyMaterialsVariantAsync(int variantIndex, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
int | variantIndex | glTF materials variant index. |
CancellationToken | cancellationToken | Token to submit cancellation requests. The default value is None. |
Returns
Type | Description |
---|---|
Task | A task that represents the completion of the method. |
See Also
GetMaterialsVariantName(int)
Declaration
public string GetMaterialsVariantName(int index)
Parameters
Type | Name | Description |
---|---|---|
int | index |
Returns
Type | Description |
---|---|
string |