Oculus Quest And Quest 2 Set Up For Unity Development November 2020

After trouble shooting for the last few hours with out-dated tutorials, I figured I’d write one that works with the current XR updates. Note: This is on the 2019 LTS build, I have not tried this for the 2020 build as those tend to not be as stable at the moment.

1. Set up your Unity Project

Install 2019.4.13f LTS, Make sure to install the Android Build Support Module, along with the SDK & NDK Tools and the OpenJDK Tool. They can be found on the dropdown of the Android Build Support. If you already have the version downloaded you can click on the install section and click the 3 dots to add them in.

2. Download Oculus Integration from the Asset Store

Search the asset store for Oculus, it should be one of the first results, download it and import the package. After Importing it will ask you to update to the Utilities Project. Go ahead and Update, Restart, and Update the Spacializer plugins as well when you are prompted. Unity will then Restart.

3. Download The Required XR Packages

The package manager can be found under Window -> Package Manager. We will be downloading Oculus XR Plugin, XR Interaction Subsystems and XR Plugin Management.

4. Adjust Project Settings

Opening up the Project Settings via Edit -> Project settings, you will notice a new section called XR Project Management. Within XR Project Management click on the Android Tab, and check the Oculus Box. In Player settings set the minimum API level to 23(Marshmallow). Below the XR Project Management you will also see an Oculus Section. Within Oculus uncheck the “Optimize Buffer Discards”

5. Set Oculus into Dev Mode

Using the mobile Oculus App, after setting up your Oculus Quest or Quest 2, navigate to settings and Select your headset. In the dropdown select More Settings. Press Developer Settings, and flip the switch to turn developer mode on. You will then have to go to https://developer.oculus.com/ and create an account and link it to your Oculus Account.

6. Linking Unity Project To Oculus Project

On the top bar in unity got to Oculus ->Platform -> Edit Settings. This will open a window in the inspector. Press the “Create/Find Your App on https://dashboard.occulus” button and it will open up the site for you. Create a new app and select Oculus GO, for the platform. Oculus recently changed their rules so that you have to submit a design doc for certification and approval before being able to release on quest, but you can still test your projects functionality on your Quest or Quest 2 using the Go Platform. You will then be given and App ID. Enter this into both fields above the “Create/Find Your App on https://dashboard.occulus” button that are in the inspector in Unity.

7. Change Your Build Settings To Android

Under Fire -> Build Settings, select Android and press the Switch Platform button. This may take a few minutes. Afterwards change the texture compression to ASTC.

8. Add A VR Avatar To the Scene

In the project window navigate to Oculus -> VR -> Prefabs and drag an OVRCameraRig into the scene.

9. Plug in your Oculus Quest

Plug your Quest or Quest 2 into the computer. Put on the headset and accept the two prompts that it gives you about sharing information with the computer. In Unity under build settings, switch the build device to your Quest Headset, and Check the Development Build box.

10. Build To Quest

Now all you have to do is press Build and Run, the Quest will automatically launch the application. In our case it will just be the scene view, but you can look around and the dull grey floor and always boring light blue skybox! Your scene is now set up to work with the Oculus Quest! Time to get to developing!

EDIT: 11. Play in Editor

To test the program in the editor rather than building every time you want to see your scene in VR, switch back to a standalone build rather than android. In the XR Management settings we accessed in Step 4, select Oculus and under the PC tab(its a picture of a monitor ), Enable Dash Support. Open the oculus app on your PC (or download it ) and navigate to Settings -> General and enable Unknown Sources. Now plug you headset in and run the Oculus Link Beta (it should prompt you). When you hit play in Unity it should launch into your headset making development and testing MUCH faster.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store