I'm trying to change the texture of an object, instead of giving it a solid color, for that I added a .jpg image to the assets.xcassets folder, and then from the code I gave it the texture but I did not have the option to select it said texture. Do you know if I will be skipping a step to add the texture or am I doing something wrong?
super.viewDidAppear(animated)
let sponge = SCNNode()
sponge.geometry = SCNSphere(radius: 0.2)
sponge.position = SCNVector3(-0.2,0,-0.5)
sponge.geometry?.firstMaterial?.diffuse.contents = spongeDiffuse
let rock = SCNNode()
rock.geometry = SCNSphere(radius: 0.2)
rock.position = SCNVector3(0.3,0,-0.5)
rock.geometry?.firstMaterial?.diffuse.contents = rockDiffuse