Chapter 8 | Build App

Users will build an app that can run in one of three modalities: Meta Quest 2/Pro, Vive Focus 3, or XR Device Simulator.

Unity Hotkeys

pageReferences

Chapter 8 Tutorial Video

Confirm Modality to Run App

8.1. CHOOSE the appropriate MODALITY to run the app in the list below and skip to the applicable step to begin.

  • If building for the Meta Quest 2/Pro, continue to step 8.2.

  • If building for the Vive Focus 3, skip to section 8.6.

  • If no headset is available to build, skip to section 8.10. for XR Device Simulator instructions.

Meta Quest 2/Pro Instructions

8.2. Setup build settings for the project by SELECTING the menu option FILE > BUILD SETTINGS.

8.2.1. GRAB the 3 SCENES called Login, AlienInvasion, and AlienShip (found in the project assets folder).

8.2.1.1. DRAG the three scenes INTO the top portion of the BUILD SETTINGS WINDOW.

Make sure the Login scene is first in the list for the app to work correctly by left clicking and dragging it to the top of the list.

8.2.2. In the Build Settings window under platform, ENSURE ANDROID is selected. If not, CLICK ANDROID in the platform menu then CLICK the SWITCH PLATFORM button.

8.3. Configure the project settings by selecting the menu option EDIT > PROJECT SETTINGS.

8.3.1. CLICK XR PLUG-IN MANAGEMENT and in the Android tab, ENSURE OCULUS is checked on.

Make take some time to download the Oculus plug-in.

8.3.2. CLICK OCULUS under XR Plug-in management and CHANGE the STEREO RENDERING MODE to Multiview for better performance in the headset.

8.4. ENSURE the META QUEST 2/PRO is connected to the computer with any USB-C cable (Oculus link or a supported cable are only needed for using the headset in Unity in play mode).

8.5. Build the app to the headset by SELECTING the menu option FILE > BUILD AND RUN.

8.5.1. The Meta Quest 2/Pro headset needs to be set to developer mode for this step to work correct. Refer to the below document for more instructions.

Build and Run will build to the headset, whereas Build will build an APK file to the computer.

8.5.2. Chapter 8 is now complete. SKIP ahead to CHAPTER 9.

Vive Focus 3 Instructions

8.6. Setup build settings for the project by selecting the menu option to FILE > BUILD SETTINGS.

8.6.1. GRAB the 3 SCENES called Login, AlienInvasion, and AlienShip (found in the project assets folder). DRAG them INTO the top portion of the BUILD SETTINGS WINDOW.

Ensure the Login scene is first in the list for the app to work correctly.

8.6.2. In the Build Settings window under platform, ENSURE ANDROID is selected. If not, CLICK ANDROID in the platform menu then CLICK the SWITCH PLATFORM button.

8.7. Configure the project settings by SELECTING the menu option EDIT > PROJECT SETTINGS.

8.7.1. CLICK XR PLUG-IN MANAGEMENT. Ensure OpenXR and Vive Focus 3 Support Feature Group are checked.

Make take some time to download the OpenXR and Vive Focus 3 Support Feature Group plug-in.

8.7.2. SELECT OPENXR (below XR Plug-in Management).

8.7.2.1. CLICK the PLUS SYMBOL on the right of the Interaction Profiles section and ADD VIVE FOCUS 3 CONTROLLER INTERACTION.

8.7.2.2. If Oculus Touch Controller Profile is added, remove it by selecting it in the list and CLICKING the MINUS SYMBOL.

8.8. CONNECT the Vive Focus 3 to the computer via a SUPPORTED CABLE.

8.9. Build the app to the headset by SELECTING the menu option to FILE > BUILD AND RUN.

8.9.1. Chapter 8 is now complete. SKIP ahead to CHAPTER 9.

XR Device Simulator Instructions

8.10. Turn on the XR Device Simulator game object found in the hierarchy window for each scene.

8.10.1. The scenes can be found in the assets folder inside the project tab (generally found towards the bottom of the Unity window).

To open a scene, either double-click the scene in the assets folder or go to File > Open Scene.

8.10.2. To turn on the game object, first SELECT the XR Device Simulator in the hierarchy window.

When an object is turned off it is shown as grayed out.

8.10.2.1. CLICK the CHECKBOX found at the top of the inspector window (generally found on the right side of the Unity window).

8.10.2.2. The object should now be turned on and no longer grayed out.

8.10.2.3. SAVE the SCENE before continuing to the next step.

8.10.2.4. REPEAT STEPS 8.10.1. THROUGH 8.10.2.3. for the other two scenes.

8.10.3. Once all XR Device Simulator objects have been turned on, then OPEN the LOGIN SCENE and PRESS PLAY.

The play button can be found at the top of the Unity Window and will play the app using the keyboard for controlling the user's interactions.

When inside the XR Device Simulator, hold down the right mouse button on the scene to move the camera. While holding the right mouse button, the user can scroll down to zoom out. The user can also hold shift or space to move their hands.

If needed, reference the link below for more detailed information regarding Unity’s controls for interacting with the app without a headset.

Last updated