camera's node name not visible in statistics

100 Views Asked by At

I attached a name property to my camera node. The camera is fully functional and does its job.

let cameraNode = SCNNode()
cameraNode.name = "I am camera"
cameraNode.camera = SCNCamera()
...

The documentation states the following:

The SceneKit statistics view (see showsStatistics) also shows the names of nodes with attached cameras.

So I went to viewDidLoad and wrote:

 sceneView.showsStatistics = true

However, in the simulator I only see this.enter image description here

Not sure what to expect, but shouldn't there be a "I am camera" text somewhere? Where can I see the " I am camera" name?

1

There are 1 best solutions below

3
On

I believe this only applies to OSX applications. You can however get the name of the active camera by grabbing your SCNView's pointOfView node and reading the name from it:

https://developer.apple.com/library/ios/documentation/SceneKit/Reference/SCNSceneRenderer_Protocol/index.html#//apple_ref/occ/intfp/SCNSceneRenderer/pointOfView