Building a VR for Oculus Quest


Unity Version:

The one I am using is 2019.2.10f1. With a or b version, that might not work smoothly. Pick the latest final version. you can then check if you have the right modules by clicking the 3 dots menu from the version you are using and select Add Modules. 

Make sure you have installed the modules for Android Build Support. Expand the tree and get both Android SDK & NDK Tools and OpenJDK as well.

Oculus Account, Oculus App, and Developer Mode

Oculus Account:

In this step, we are creating a new account if you do not have one. And then we are going to get the App ID which we need later for the Quest to work with Unity 

  1. Create an account at Oculus
  2. Then go to the Developer page
  3. select Manage on the side menu
  4. If you see both Create New App and Create New Organization, select Create New App. If you only see Create New Organization, select that and follow the steps, the Create New App will appear once you have created the new organization.
  5. You can use any App Name you like. For Platform, select Oculus Go & Gear VR
  6. You should be able to see the following page with the App ID. we will come back for it later when Unity asks us for the App ID.

Oculus App and Developer Mode::

We are going to switch the Quest to developer mode in the Oculus App on your phone

  1. Get the Oculus app from the app store
  2. Log into the same Oculus account that you just create the App ID from
  3. In the Settings tab, select Pair New Headset and follow the steps
  4. IMPORTANT: connect your Quest to CMU-DEVICE wireless network
  5. Once the headset is paired, you should be able to see the device listed right under your name in the Settings tab. Select the device -> More Settings -> Developer Mode


Create and Configure the project

  1. Create a new 3D project
  2. Import Oculus Integration from the asset store
  3. When it's done, there might be a dialog box to ask you for a plugin update. Press yes/upgrade and you will be asked permission to restart Unity, let it restart.
  4. At this point, you should see Oculus listed in the top menu bar

Project settings

Now we have to configure Unity to build our project for Oculus VR on Android. We have three setting changes here.

  1. Go to the Edit Menu -> Project Settings -> Player tab
  2. Select the Android tab in the Player tab
  3. In XR Settings, add Oculus for the Virtual Reality SDKs list with the "+" button
  4. In Other Settings, remove Vulkan from the Graphics APIs
  5. Scroll down in Other Settings, change Minimum API Level to "Android 4.4  KitKat (API Level 19)"

Oculus Platform Settings

Here we need to type in your oculus account info and the App ID from the oculus website

  1. Find the Edit Settings menu
  2. you should see two red exclamation marks on the right panel
  3. Copy App ID from website to both Oculus Rift and Oculus Go/Quest or Gear Vr
  4. Then log in to your Oculus account in Unity

Build Settings

This is almost the final step.

  1. Go to File -> Build Settings -> go to the Android tab
  2. Set Texture Compression to ASTC
  3. Press Switch Platform, this will take some time
  4. Connect the Quest to the computer with the USB C cable
  5. Set Run Device to Oculus Quest, you might have to click the refresh button to see the Quest

If you press Build And Run, you should be able to view the scene in the headset.