Model:getMaterial

Returns a Material loaded from the Model, by name or index.

This includes Texture objects and other properties like colors, metalness/roughness, and more.

material = Model:getMaterial(name)

Arguments

NameTypeDescription
namestringThe name of the Material to return.

Returns

NameTypeDescription
materialMaterialThe material.

material = Model:getMaterial(index)

Arguments

NameTypeDescription
indexnumberThe index of the Material to return.

Returns

NameTypeDescription
materialMaterialThe material.

See also