StartScene Sample Scene
Updated: Dec 10, 2024
The Unity StartScene sample scene shows a simple scene selection menu containing other scenes.
Once the sample scene has been configured in Unity and started, the user is presented with a World Space canvas that has a list of some of the sample scenes. When one is selected from the list, a loading screen appears, and a moment later, the user should find themselves in the scene they selected. There is no way to go back to the StartScene once you have entered one of the other sample scenes.

This section describes the key prefabs and Game Objects that make the core functionality of this scene work. For this scene, the following are covered:
- CanvasWithDebug Prefab – This prefab contains everything needed to define a World Space UI like the scene selector in this sample.
- StartMenu Game Object - This object defines the UI in the scene using the tools provided by CanvasWithDebug. It also loads the appropriate scene when one of the buttons is pressed.
- CompositorLayerLoadingScreen Game Object – This object uses OVROverlay compositor layers to create the loading screen after a scene has been selected.
The CanvasWithDebug prefab contains Unity World Space canvas components and objects as well as the DebugUIBuilder
script, which includes methods to add UI elements to panes on the canvas.
This object contains only the script that defines the UI using the methods from the DebugUIBuilder
script. This script also includes methods that load the selected scene when its corresponding button is pressed.
CompositorLayerLoadingScreen Game Object This component contains two basic OVROverlay layers.
overlay
is a cubemap texture that is expressed in the scene as the world-locked “environment”.
loadingText
is a quad layer with a simple text texture that indicates to a user that the user is in a loading interstitial. For more information, see the
OVROverlay Sample Scene and
VR Compositor Layers and OVROverlay.
The objects used in this sample scene are covered in other sample topics. In this scene, the scene select functionality requires some additional configuration of Unity before it will work. Here’s how to make the scene work:

- In Unity, open File > Build Settings.
- In the Project window, navigate to Assets > StarterSamples > Usage.
- In the Project window, select the scene files for those listed in the menu and drag them to the Scenes In Build pane in the Build Settings window.
- Close the Build Settings window.
The scene should now function as previously described. Keep in mind that the only way to select another scene is to stop the currently running scene and press the Play button again.