Returns the material property at the specified index in the material, for use with subscript syntax.


subscript(idx: Int) -> MDLMaterialProperty? { get }



An index in the material’s list of material properties; must be less than the value of count.

Return Value

The material property at the specified index.


The ordering of material properties in a material is arbitrary, but you can use this method (together with the count property) to iterate through the material’s complete list of material properties. You can also iterate through material properties using Fast Enumeration.

See Also

Accessing Material Properties with Subscript Syntax

subscript(String) -> MDLMaterialProperty?

Returns the material property with the specified name, for use with subscript syntax.

var count: Int

The number of material properties in the material.