I am trying to read a .obj file into a SCNNode from the local drive on a macOS app (not iOS) with the following code:
let url = NSURL(string: objPath!)
let asset = MDLAsset(url: url! as URL)
let node = SCNNode(mdlObject: asset.object(at: 0))
node.geometry?.firstMaterial?.diffuse.contents = NSColor.red
scnView.scene?.rootNode.addChildNode(node)
The objPath is correct and absolute path to a local folder (not inside app build). But it's giving "Could not open OBJ file" error while reading. I need to access local path only.