Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SceneKit SCNNode init(mdlObject:) missing?

I'm using Xcode 7.3.1, Swift 2.x, iOS target is 9.3. I can find convenience init init(MDLObject mdlObject: MDLObject) in Apple docs, but I don't see it in my project. I opened standard game project starter, SceneKit is imported. I've tried:

  • Double checking iOS version
  • Adding import ModelIO
  • Finding "mdlObject:" in header files in SceneKit.framework - not found
  • Looking for alternative methods (maybe Apple moved it somewhere) but there are no other inits with that parameter, no class function, nor I found any corresponding export function in MDLObject
  • Cleaning project...

I can see all SceneKit classes, and I can create MDLAsset (part of ModelIO, can return MDLObjects) instance. Any ideas, maybe I've overlooked something obvious?

like image 777
Maciej Kozieł Avatar asked Sep 10 '16 11:09

Maciej Kozieł


1 Answers

the following should do

import SceneKit.ModelIO
like image 145
mnuages Avatar answered Nov 12 '22 11:11

mnuages