I am using ARKit for my application and I am trying to dynamically download .scn files from a web server
Here is part of my code
let url = URL(string: "http://192.168.0.31:1234/5a27e09cbad20a7a03ad5d80/box/box.scn")
if let objectScene = try? SCNScene(url: url!, options: [.overrideAssetURLs: true]) {
print("load success")
let node = SCNNode()
for childNode in objectScene.rootNode.childNodes {
node.addChildNode(childNode)
}
sceneView.scene.rootNode.addChildNode(node)
} else {
print("error loading")
}
box.scncontains textures here . And I got an error message
Failed to load: C3DImage 0x1c00f6f80 src: file: ///var/containers/Bundle/Application/110F7AB6-00F8-4E5B-B843-46551A23CB7F/ar.app/maps/CMU_Split_Face_Running_200x400_bump.jpg 0.00 [0000] 0.0000.00.000000 [0000] 000000]
Why is Scenekit trying to load these textures from a local file? How can i fix this?
source
share