skynard
skynard

Reputation: 143

Will a Reality Composer project file with 2 scenes play in Xcode?

I am using Reality Composer and have 2 scenes in a project file.

Will both of those scenes play in my Augmented Reality app?

Upvotes: 3

Views: 618

Answers (1)

Andy Jazz
Andy Jazz

Reputation: 58113

You can have as many Reality Composer scenes in your AR app as you wish.

Here is a code snippet how you could read in Reality Composer scenes:

import RealityKit

override func viewDidLoad() {
    super.viewDidLoad()

    let sceneUno = try! Experience.loadFirstScene()
    let sceneDos = try! Experience.loadSecondScene()
    let sceneTres = try! Experience.loadThirdScene()

    arView.scene.anchors.append(sceneUno)
    arView.scene.anchors.append(sceneDos)
    arView.scene.anchors.append(sceneTres)
}

Also, you could read this post to find out how to collide entities from different scenes. In other words, RealityKit app can mix and play several Reality Composer scenes at a time.

Upvotes: 1

Related Questions