Unable to load scene in playground using XCode 7 beta 3

I can't load the scene in the XCode 7 beta 3 playground ... although it worked with Xcode 6.4 .... is this a bug or has something changed?

ps: SCNScene (named: "ship.dae") returns nil.

My assets folder contains ship.dae and texture.png (from 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)

      

+3


source to share


1 answer


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

      

+3


source







All Articles