【发布时间】:2016-11-04 13:32:03
【问题描述】:
虽然记录了以下MDLAsset 类方法,但ModelIO 库中不存在:
+ assetWithSCNScene:bufferAllocator:
+ assetWithSCNScene:
因此,目前无法读取SceneKit .scn 文件并创建MDLAsset。
解决方法是什么?
更新 0
我正在导入这些:
import SceneKit
import ModelIO
import MetalKit
import GLKit
在我的渲染器中,我尝试从 SCNScene 实例化 MDLAsset:
guard let scene = SCNScene(named:"ball.scn") else {
fatalError("Error: Can not create scene")
}
let asset = MDLAsset(scnScene:scene, bufferAllocator:MTKMeshBufferAllocator(device: device))
我收到此错误
表示找不到类别。我在这里错过了什么?
【问题讨论】: