我正在尝试从URl下载3d模型并放入ARKit应用程序。这是我的代码:
func addItem(hitTestResult: ARHitTestResult) {
let url = URL(string: "https://doc-0k-9s-docs.googleusercontent.com/docs/securesc/hbcaqfp5mt16eq0ub4t5v9ch588idcc9/66jirrfaadh438gudijui5vq39hblj21/1519236000000/11854387276548053415/11854387276548053415/1ab55L4__Qy7HSPf10-a4H3lqUdWSvPLl?e=download")
if let objectScene = try? SCNScene(url: url!, options: [.overrideAssetURLs: true]) {
print("load successful")
let node = SCNNode()
for childNode in objectScene.rootNode.childNodes {
node.addChildNode(childNode)
}
sceneView.scene.rootNode.addChildNode(node)
} else {
print("Error loading")
}
}
它在objectScene行崩溃了。如何解决这个问题。谢谢