Home > Enterprise >  Can I set the background of a SCNScene from the scene editor in Xcode?
Can I set the background of a SCNScene from the scene editor in Xcode?

Time:03-09

This might be a stupid question, but how can I set the background of my scene from the Scene editor itself ? I want the Scene to be transparent so I can overlay it on top of UI, for now I do it in code :

func initMainScene() -> SCNScene {
    guard let newScene = SCNScene(named : "mainScene.scn")
        else { fatalError("Unable to load scene file.") }
    newScene.background.contents = UIColor.clear
    return newScene
}

CodePudding user response:

the scene background color can be edited in the very last inspector on the right (named "Scene Inspector", with shortcut 8)

  • Related