尽管记录了以下MDLAsset
类方法,但库中不存在ModelIO
:
+ assetWithSCNScene:bufferAllocator:
+ assetWithSCNScene:
因此,目前无法读取SceneKit
.scn文件并创建MDLAsset
.
解决方法是什么?
更新 0
我正在导入这些:
import SceneKit
import ModelIO
import MetalKit
import GLKit
在我的渲染器中,我尝试MDLAsset
从一个实例化一个SCNScene
:
guard let scene = SCNScene(named:"ball.scn") else {
fatalError("Error: Can not create scene")
}
let asset = MDLAsset(scnScene:scene, bufferAllocator:MTKMeshBufferAllocator(device: device))
我收到这个错误
找不到指示类别。我在这里错过了什么?