0

Why do these lines of code work:

let text = NSString(string: "Test")
(node.geometry as! SCNText).string = text

but these ones don't:

let text = NSAttributedString(string: "Test")
(node.geometry as! SCNText).string = text

When using attributed text the SCNText simply does not show up. Any ideas?

Thanks.

Andy Jazz
  • 49,178
  • 17
  • 136
  • 220
Chris
  • 1,231
  • 2
  • 10
  • 20

1 Answers1

0

I found out myself. The problem was the font size which is relative to the scene dimensions. In my case the standard font size was way to small.

Sovled!

Chris
  • 1,231
  • 2
  • 10
  • 20