Maciej Kozieł Maciej Kozieł - 1 year ago 138
iOS Question

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

  • 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?

Answer Source

the following should do

import SceneKit.ModelIO
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download