top of page

Consolidated Setup for Quest Development in Unity

June 17, 2019

QuestSettings.jpg

 

The Oculus documentation for setting up for Quest development in Unity is scattered across several pages. This post is my consolidated list of settings to get you up and running quickly. I'm using Unity 2019.1.0f2, which Oculus recommends. Older recommended versions include 2018.4 LTS, or 2017.4 LTS.

Quest Device Setup

Setup Organization

First off you have to setup a developer organization:

Developer Mode

Next, you need to put your Quest in Developer Mode:

  • Download and start the Oculus app from your phone's app store.

  • In the lower right tap Settings and you should see your Quest listed as "Nearby".

  • Tap the Oculus Quest and the app should connect.

  • Tap the drop down arrow on the right to expand the device settings.

  • Click on More Settings > Developer Mode > and Enable.

Oculs App More Settings.png
Developer Mode.png

Install the Oculus Go ADB Driver (Windows only)

Connect to Computer

  • Connect the Quest via USB and put the headset on.

  • You should be prompted with a message saying "Allow USB Debugging?".

  • Click Always allow from this computer and OK.

Allow USB Debugging.jpg

Android Setup

Oculus recommends installing Android Studio and using the SDK manager to install the SDK, NDK, JDK. Unity recommends using Unity Hub and installing Android Build Support to guarantee compatibility with Unity. I've found installing through the SDK manager is a hassle to get the correct versions for Oculus and Unity to both be happy, and that using the Android Build Support in Unity works fine. To install it, do the following:

  • Open Unity Hub.

  • Select Installs.

  • For your version, select the menu then select Add Modules.

  • Check Android Build Support: Android SDK & NDK Tools and click Install.

Unity_Hub_UTK0NcvoUd.png
Unity_Hub_eAHWiIcyS1.png

ADB Setup

Unity Android Build Support embeds the SDK, NDK, JDK into the Program Files hierarchy for that version of Unity. This includes adb.exe, used for checking device connections, debugging, logging, etc. To use ADB in a command prompt we need to add it to our Windows Environment Variables (sorry, not sure what the process is for Mac).

  • Copy the path to the folder containing adb.exe, for example: C:\Program Files\Unity\Hub\Editor\2019.1.0f2\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools

  • Press Windows key and search "Edit the system environment variables" and click the option that shows up.

  • Select System Properties > Advanced > Environment Variables.

  • In System Variables select Path and Edit…

  • Select New and paste this path.

  • Select OK.

SystemPropertiesAdvanced_qIZCpc0IIR.png
SystemPropertiesAdvanced_sxa6NPpANf.png
SystemPropertiesAdvanced_tyXuJ5MWM9.png

Run Command Prompt and enter “adb devices” and you should see it print a serial code followed by “device” to show that it sees the Quest.

cmd_gQnjia34a2.png

Unity Build Settings​ & Packages


Build Settings

  • Switch platform to Android.

  • Texture Compression: ASTC

  • Development Build: Enable

  • Autoconnect Profiler: Enable (Optional)

  • Script Debugging: Enable

BuildSettings.png

Packages

Install the following packages:

OculusAndroid.png
OculusIntegration.png

App ID

  • In the top menu in Unity choose OculusPlatformEdit SettingsInspector.
  • Click the button Create / Find your app on https://dashboard.oculus.com
  • Click Create New App
  • Click Oculus Go & Gear VR
  • Give the app a name and click Save and Continue
  • Copy the Application ID.
CreateApp.png
SelectApplication.png
CopyAppID.png
  • Back in Unity in OculusPlatformEdit Settings paste the ID in the Oculus Go/Quest or Gear VR field.
AppID.png

Project Settings

Open Edit →  Project Settings

Audio

  • DSP Buffer Size: Good Latency.

  • Spatializer Plugin: OculusSpatializer

AudioSettings.png

Graphics

  • For Medium and High Tier set Use Defaults to be disabled.

  • Set Standard Shader Quality to Low for both tiers. 

  • If possible, avoid using the standard shaders and use mobile shaders instead.

  • Rendering Path should be Forward Rendering for all tiers (should already be set as default).

  • Consider adding shaders to the Preloaded Shaders list at the bottom. This will impact loading times but, will help avoid needing to load and compile these shaders on demand.

GraphicsSettings.png

Player →  Resolution and Presentation

  • Use 32 bit Display Buffer: Enable

  • Disable Depth and Stencil: Disable 

ResolutionSettings.png

Player → Other Settings → Rendering

  • ​Auto Graphics API: Disable

  • Graphics APIs:

    • Remove Vulkan API

    • OpenGLES 3 should be the only one.

  • Require ES3.1: Enable

  • Require ES3.1+AEP: Enable 

  • Multi Threaded Rendering: Enable

  • Static Batching: Enable

Player → Other Settings → Identification

  • Package Name: Enter an appropriate name.

  • Minimum API Level: Android 7.1 ‘Nougat’ (API level 25)

  • Target API: Automatic (highest installed)
     

RenderingIdentificationSettings.png

Player → Other Settings → Configuration

  • Scripting Backend: IL2CPP

  • API Compatibility Level: .NET 4.x

Player → Other Settings → Optimization

  • Prebake Collision Meshes: Enabled

  • Keep Loaded Shaders Alive: Enabled

  • Optimize Mesh Data: Enabled

ConfigOptimizationSettings.png

Player → XR Settings

  • Virtual Reality Supported: Enabled

  • Virtual Reality SDKs: Oculus

  • Stereo Rendering Mode: Single Pass

XRSettings.png

Quality

Remove all levels other than Medium, and rename Medium to Quest.

  • Pixel Light Count: 1

  • Texture Quality: Full Res

  • Anti Aliasing: 4x

  • Soft Particles: Disable

  • Realtime Reflection Probes: Enable

  • Billboards Face Camera: Enable

  • Shadows:

    • Hard Shadows Only with Low Resolution

    • or

    • Disable Shadows

  • Skin Weights: 2

  • V Sync Count: Don't Sync

QualitySettings.png

Lighting Settings

Oculus recommends: "Avoid Unity’s Default-Skybox, which is computationally expensive for standalone. We recommend setting Skybox to None (Material), and Ambient Source to Color in Window > Lighting. You may also wish to set Camera.clearFlags to SolidColor (never Skybox)."

  • Skybox Material: None

  • Environment Lighting Source: Color

  • Realtime Global Illumination: Disable

  • Lightmapper: Progressive CPU

  • Directional Mode: Non-Directional

LightingSettings.png

Resources

The above steps and settings were compiled from these resources which contain other valuable notes not listed above:

bottom of page