ice-wind
ice-wind

Reputation: 868

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

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
}

Upvotes: 1

Views: 56

Answers (1)

mnuages
mnuages

Reputation: 13462

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

Upvotes: 2

Related Questions