<!--
{
  "availability" : [
    "iOS: 8.0.0 - 26.0.0",
    "iPadOS: 8.0.0 - 26.0.0",
    "macCatalyst: 13.1.0 - 26.0.0",
    "macOS: 10.8.0 - 26.0.0",
    "tvOS: 9.0.0 - 26.0.0",
    "visionOS: 1.0.0 - 26.0.0",
    "watchOS: 3.0.0 - 26.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "SceneKit",
  "identifier" : "/documentation/SceneKit/SCNText/string",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "SceneKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SCNText(py)string"
  },
  "title" : "string"
}
-->

# string

The string object whose text the geometry represents.

```
var string: Any? { get set }
```

## Discussion

You can supply text as an <doc://com.apple.documentation/documentation/Foundation/NSString> or <doc://com.apple.documentation/documentation/Foundation/NSAttributedString> object. When you use an <doc://com.apple.documentation/documentation/Foundation/NSString> object, the text geometry’s properties determine the style of the entire body of text. You can use an <doc://com.apple.documentation/documentation/Foundation/NSAttributedString> object to provide a body of text containing multiple styles, in which case the text geometry’s properties define the default style for portions of the string without style attributes.

The default value of this property is `nil`, which creates an empty text geometry.

---

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)