SCNView : setting "overlaySKScene" doesn't render anything
SCNView : setting "overlaySKScene" doesn't render anything
- Subject: SCNView : setting "overlaySKScene" doesn't render anything
- From: Gavin Eadie <email@hidden>
- Date: Fri, 26 Feb 2016 17:19:23 -0500
I have struggled long and hard with this .. I think I’ve looked at 'everything' related on Google, but I’m still flummoxed.
This is on Mac OS 10.11.3, build with Xcode 7.2, and this is what I think is the salient code.
override func viewDidLoad() {
super.viewDidLoad()
let scene = SCNScene()
let sceneView = self.view as! SCNView
sceneView.scene = scene
sceneView.overlaySKScene = OverlayScene(size: sceneView.bounds.size)
sceneView.backgroundColor = NSColor.blackColor()
sceneView.autoenablesDefaultLighting = true
sceneView.showsStatistics = true
}
('OverlayScene' generates a simple SKScene with some centered text)
On the Mac it works correctly if the window layout is described by a XIB.
On the Mac it doesn’t show the overlay if the window layout is described by a Storyboard.
The XIB and Storyboard are quite different (as is normal), but what in there could have this effect?
Any help to resolve this would be appreciated .. I suspect, as is often the case, I’m overlooking something obvious .. Thanks
FWIW: This same code works correctly on iOS using a Storyboard.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden