Although documented the following MDLAsset
class methods do not exist in the ModelIO
library:
+ assetWithSCNScene:bufferAllocator:
+ assetWithSCNScene:
So, currently there is no way to read in a SceneKit
.scn file and create an MDLAsset
.
What is the work around?
UPDATE 0
I am importing these:
import SceneKit
import ModelIO
import MetalKit
import GLKit
In my renderer I attempt to instantiate an MDLAsset
from an SCNScene
:
guard let scene = SCNScene(named:"ball.scn") else {
fatalError("Error: Can not create scene")
}
let asset = MDLAsset(scnScene:scene, bufferAllocator:MTKMeshBufferAllocator(device: device))
I get this error
Indicating the category cannot be found. What have I missed here?