我正在尝试创建包含SCNScene纹理的pod,并得到了一个错误:
SceneKit Error: Failed loading : C3DImage
src:file:///Users/.../Example.app/Templates.scnassets/grid.png纹理和场景在同一个文件夹中。
我试着用SCNSceneSource加载
let sceneData = try Data(contentsOf: sceneUrl)
let options = [.overrideAssetURLs: true,
.assetDirectoryURLs: MYPod.bundle().bundleURL
] as [SCNSceneSource.LoadingOption : Any]
let source = SCNSceneSource(data: sceneData, options:options)
scene = (source?.scene(options: options))!但是得到了相同的结果(路径不变)
发布于 2017-10-23 08:35:20
你应该把所有的材料都用代码和(抱歉,伪代码)
If material.contents.type == String.type {
material.contents = UIImage(named: <path tofolder>/material.contents)
} https://stackoverflow.com/questions/43447774
复制相似问题