问题
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?
回答1:
the following should do
import SceneKit.ModelIO
来源:https://stackoverflow.com/questions/39425510/scenekit-scnnode-initmdlobject-missing