Reputation:
I'm unable to load a scene in XCode 7 beta 3 playground... although it was working with Xcode 6.4.... is it bug or something as changed ?
ps : SCNScene(named: "ship.dae") returns nil.
In my Resources folder is ship.dae and texture.png (from the SceneKit template), and here is my code :
//: Playground - noun: a place where people can play
import SceneKit
import XCPlayground
var view = SCNView(frame: NSRect(x: 0, y: 0, width: 500, height: 500))
var scene = SCNScene(named: "ship.dae")
view.scene = scene
XCPShowView("view", view: view)
Upvotes: 3
Views: 936
Reputation: 292
In Xcode 7
import XCPlayground
let view = // your view
XCPlaygroundPage.currentPage.liveView = view
In Xcode 8
import PlaygroundSupport
let view = // your view
PlaygroundPage.current.liveView = view
Upvotes: 3