Interface IMaterialsVariantsSlot
Represents a material slot.
Namespace: Unity.Cloud.Gltfast
Assembly: Unity.Cloud.Gltfast.dll
Syntax
[MovedFrom(true, "GLTFast", "glTFast", null)]
public interface IMaterialsVariantsSlot
Methods
GetMaterialIndex(int)
Provides the glTF material index, given a materials variant index. If variantIndex is invalid (e.g. negative) or the slot does not have a material override for the given variantIndex, it returns the default material index.
Declaration
int? GetMaterialIndex(int variantIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| int | variantIndex | Materials variant index. |
Returns
| Type | Description |
|---|---|
| int? | Corresponding glTF material index, or null when no material is assigned. |