Multi-Scene Setup

In depth learning on Basic Scene Configuration is found in this course in Motive Academy.

Overview

Often an app will require multiple environments. It is often better to load Scenes that host the environments dynamically instead of putting all of the different environments into one Scene. This document walks you through the process of enabling multi-Scene setups with Motive.

Note that this documentation requires that all of your Scenes are included in the application at build time. In Motive SDK 2.1, you can load Scenes from an Asset Bundle as described here:

Create an Initial Scene

The first step is to create a Scene that hosts the Motive Prefabs. This Scene is set up much like , however it will not include any environment pieces as they would conflict with elements in the other Scenes as they are loaded.

Create a Launch Scene

The Launch Scene is the Scene that the user will see when they first launch the app. This may be one of the Scenes that is going to be used for the training. This Scene must not include any Motive Prefabs or a camera. To designate the Launch Scene, add a Scene Launcher Starter to your Initial Scene:

  1. Add a Game Object to the Initial Scene

  2. Attach the Scene Launcher Starter component to the Game Object

  3. Set the Scene Name to the name of the Launch Scene:

  4. Add the Scene Launcher Starter to the “Startup Components” in the Setup node of the App Game Object:

Note that if you are working with the Launch Scene as an additive Scene, the Scene Loader will skip the load since the Scene is already loaded. This helps to streamline the development cycle.

Configure Additional Scenes

Additional Scenes are configured the same way as the Launch Scene:

  1. Remove all Motive Prefabs

  2. Remove the main camera

Add Scenes to the Build

Finally, the Scenes need to be added to the build. (Dynamic Scene loading will be added in a future release.)

  1. Open the Build Settings

  2. Drag all of the Scenes that the app will use into the “Scenes In Build” window. Note that the Initial Scene must be listed first:

Use the “Load Scene” Resource

Finally, you can use the “Load Scene” Resource to load the required Scene for any Scenario. Note that Scene Names are case-sensitive:

The Scene will stay loaded until this Frame or Script is closed.

Related Articles

Loading Scenes via Asset Bundle