<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ModelIO",
  "identifier" : "/documentation/ModelIO/MDLMaterialProperty/init(name:semantic:string:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Model I/O"
    ],
    "preciseIdentifier" : "c:objc(cs)MDLMaterialProperty(im)initWithName:semantic:string:"
  },
  "title" : "init(name:semantic:string:)"
}
-->

# init(name:semantic:string:)

Initializes a material property with a string value.

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

## Parameters

`name`

A descriptive name for the material property. For details, see the [`name`](/documentation/ModelIO/MDLMaterialProperty/name) property.

`semantic`

The semantic meaning for the material property’s value. For details, see the [`semantic`](/documentation/ModelIO/MDLMaterialProperty/semantic) property.

`string`

The string value for the material.

## Return Value

A new material property object whose [`type`](/documentation/ModelIO/MDLMaterialProperty/type) property is [`MDLMaterialPropertyType.string`](/documentation/ModelIO/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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)