ModelData:getMeshMaterial

Edit

Returns the index of the material applied to a mesh.

material = ModelData:getMeshMaterial(mesh)

Arguments

NameTypeDescription
meshnumber The index of a mesh.

Returns

NameTypeDescription
materialnumber The index of the material applied to the mesh, or nil if the mesh does not have a material.

See also