How to Install Your Unity Game on Oculus Quest or Oculus Go


My students and I have been very active in creating projects for VR over the past few years. Testing these projects on a system with a connected Vive or Oculus Rift was fairly straight forward and didn’t involve a lot of steps. With the availability of the Oculus Go and Oculus Quest, the steps have increased but can still be done easily if you know the correct procedures.

In this tutorial, we will do a full walkthrough of configuring your Unity project for the Oculus Quest or Go and how to publish. If you prefer a video tutorial, scroll to the bottom!

Getting Started
For this project, we used Unity 3D Personal Edition 2019.2.10. We created a game environment of our classroom building as a way to promote our top-ranked Game Design program. The project was initially designed to be deployed to a mobile device. Everything worked great on the mobile, so we then added the Oculus tools to Unity and reconfigured to deploy to Oculus Quest and Oculus Go.
In this walkthrough, I am deploying from a MacBook Pro. Everything works the same when deploying from Windows.

Set Developer Mode on your phone/tablet

Step 1 is to place your Oculus Quest or Go into Developer Mode. This is task must be completed on the phone or tablet that is associated with your Oculus Quest or Go. Note that developer mode did not ‘stick’ the first time we set it to on. After several attempts to connect to the Quest, I check the setting again and found that it was off. Once I changed developer mode back to on, it connected to the laptop without a problem.

Step 1A: Connect to your Quest or Go with your phone or tablet. Select … More Settings

Step 1B: Select Developer Mode from the list

Step 1C: Change Developer Mode to On.

You should now be able to connect your quest or go device to your laptop or desktop system with a USB cord. You will be asked on the VR device to approve the connection.

Install Android Tools

Step 2: You will need Android Tools to be able to deploy to a Quest or Go device. At a minimum Android version SDK 19 (Android 4.4 or KitKat) and Android version SDK 25 (Android 7.1.1 Nougat) should be installed. This can be accomplished by installing Android Studio.

Once installed, you will need to add the SDKs by clicking on Configure at the bottom of the Start screen and selecting SDKs. Once you are in the Settings window, select Android 4.4 and Android 7.1.1, then click Apply.

After the installation of the Android SDKS, select the SDK Tools tab and make sure that Android SDK Tools and Android SDK Platform-Tools are applied to your installation.

Finally, if you are working on a Windows computer, you will need the Oculus ADB drivers: https://developer.oculus.com/downloads/package/oculus-adb-drivers/

Android Tools in Unity

Step 3: To build for Quest and Go you must include the Android module in your Unity installation. To ensure proper installation, I recommend launching Unity Hub in Administrator mode (right-click on the app and choose Run as Administrator). This seems to ensure that the needed Android files are installed correctly. Make sure that Android SDK & NDK Tools are selected.
If you are upgrading a project (which is what I am doing), you will need to add the Android module to the build of Unity if it is not already installed.

Make sure that Android SDK & NDK Tools are selected under Android Build Support.

Project Build Settings

Step 4: Open or create your Unity Project.

Set the Platform to Android in Build Settings (File > Build Settings). If you are converting an existing project to Android, this may take some time as Unity converts the project.
Make sure you have added the Scene to the Scenes in Build.

Once you have changed the Project to Android in Build Settings, Click on the Player Settings button in the bottom left corner of the Build Settings. Scroll down to Other Settings.
Under Identification, type in the Package Name using reverse Java notation (com.business-url.projectname) and set the Minimum API Level to Android 4.4.

Finally, still in Player Settings, scroll to the bottom and select XR Settings.
Click the checkbox on for Virtual Reality Supported. If Oculus is not listed in the Virtual Reality SDKs, click the + button and add Oculus. Then select V2 Signing (Quest).

Close the Player Settings and Build Settings windows. It’s time to get into the project!

Before you get busy building your scene, we recommend adding the Oculus Controller to the Hierarchy of your project. This is the controller for the player’s view of the environment, and where we are able to control whether we are building for Oculus Quest or Go.

If you haven’t already, download the Oculus Integration from the Asset Store. Oculus updates this asset regularly, so make sure you are using the latest version.

In your Asset folder, go to the Oculus Asset package > VR > Prefabs folder and select the OVRPlayerController. Drag it into your Hierarchy.

Place the Controller where you want the player to start in the scene. If you are starting with a blank scene, this isn’t critical, but if you are working with a developed scene, the start location is important for your player.

Once you have the OVRPlayerController in the scene, you can configure the target VR device: Oculus Quest or Oculus Go.
Open the OVRPlayerController in the Hierarchy and select the OVRCameraRig child object. In the Inspector find the OVR Manager (Script). Under Target Devices select either Quest or Gear VR or Go.


That’s it, you have configured the basic settings for your VR equipment.

Note that we have not configured the controllers or movement. In our tests, we were able to move with the thumb directional controllers on the Quest but had no movement with the Oculus Go. We will address configuring the Controllers in another post.

Lighting
When exporting to a Quest or Go, you CANNOT use Realtime Global Illumination. All lighting must be baked into the scene. Ensure that Realtime Global Illumination is not selected in your Lighting panel (Window > Rendering > Lighting Settings).
We found a huge performance boost by using the Progressive GPU (Preview) setting in the Lightmapping Setting.
Also, if you have a large scene with a lot of lights, be sure to turn the Auto Generate to Off.

Testing the App on an Oculus Quest or Go
There are several ways to test your app on the quest. You can do a Build & Run in Unity. Assuming that your Quest is properly connected, you should see the app running on the device.

If you want to place the game on the device without being tethered to a computer, you will need to do a build. A build will generate an APK file (Android Package), which is the reason we had to install all of the Android files at the beginning of this tutorial.

Building and Sideloading

Sideloading is the procedure to place the APK on a Quest or Go. We have shifted to using SideQuest rather than adb to handle Sideloading. SideQuest is an opensource project that works equally well on Windows and Mac.

Once you have your Oculus connected via USB to your computer, drag the APK file on to the SideQuest log in the top left of the app. SideQuest will take care of the rest of the installation.

Once SideQuest finishes, you will find the project in the Unknown Sources tab.

As previously mentioned, this process will get the app installed onto your Oculus Quest or Oculus Go device. There will still be a lot to do to get everything working smoothly and efficiently on the device.
Watch for more tutorials on working with the Oculus Interaction package to improve your app!

Troubleshooting
We ran into the problem that the Oculus Quest Developer Mode turned off after a while. If you are having problems connecting to your Quest, double-check developer mode.

UPDATE: With the more recent releases of Unity and Oculus tools for Unity, Oculus Go is no longer a selection option. Oculus Quest builds do not work on Oculus Go.

Recent Posts