---
title: "init(name:semantic:string:)"
framework: modelio
role: symbol
role_heading: Initializer
path: "modelio/mdlmaterialproperty/init(name:semantic:string:)"
---

# init(name:semantic:string:)

Initializes a material property with a string value.

## Declaration

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

## Parameters

- `name`: A descriptive name for the material property. For details, see the doc://com.apple.modelio/documentation/ModelIO/MDLMaterialProperty/name property.
- `semantic`: The semantic meaning for the material property’s value. For details, see the doc://com.apple.modelio/documentation/ModelIO/MDLMaterialProperty/semantic property.
- `string`: The string value for the material.

## Return Value

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

## Discussion

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

- [init(name:semantic:)](modelio/mdlmaterialproperty/init(name:semantic:).md)
- [init(name:semantic:url:)](modelio/mdlmaterialproperty/init(name:semantic:url:)-2ldk4.md)
- [init(name:semantic:textureSampler:)](modelio/mdlmaterialproperty/init(name:semantic:texturesampler:).md)
- [init(name:semantic:color:)](modelio/mdlmaterialproperty/init(name:semantic:color:).md)
- [init(name:semantic:float:)](modelio/mdlmaterialproperty/init(name:semantic:float:).md)
- [init(name:semantic:float2:)](modelio/mdlmaterialproperty/init(name:semantic:float2:).md)
- [init(name:semantic:float3:)](modelio/mdlmaterialproperty/init(name:semantic:float3:).md)
- [init(name:semantic:float4:)](modelio/mdlmaterialproperty/init(name:semantic:float4:).md)
- [init(name:semantic:matrix4x4:)](modelio/mdlmaterialproperty/init(name:semantic:matrix4x4:).md)
