Contents

init(name:semantic:string:)

Initializes a material property with a string value.

Declaration

convenience init(name: String, semantic: MDLMaterialSemantic, string: String?)

Parameters

  • name:

    A descriptive name for the material property. For details, see the Name property.

  • semantic:

    The semantic meaning for the material property’s value. For details, see the Semantic property.

  • string:

    The string value for the material.

Return Value

A new material property object whose type property is MDLMaterialPropertyType.string.

Discussion

The meaning of a string value depends on the renderer (or other software component) processing the material. For example, a string value might be treated as the name of a texture image to be loaded from a default path.

See Also

Creating a Material Property