Research information

icon picker
Unity Development for Meta Quest

Introduction

The following provides a quick-start guide for beginning VR development for the Meta Quest devices with Unity. This applies to starting new projects as well as converting existing Unity projects into the VR format.
The two methods of displaying a project are detailed below, selecting which to use depends on the use-case. Typically for projects involving other systems (haptic devices, robotics, other software, etc), running the app in Unity and having a tethered connection to a PC controlling various systems is preferable. Alternatively, a project can be built as an Android app to the headset and used without a PC connection; this is more suited to studies only requiring the hardware of the headset alone (hand tracking studies, embodiment, etc) or where the software is being distributed for unsupervised data collection without any additional hardware requirements.

Requirements

Quest, Quest 2 or Quest Pro Headset
Link Cable (Thick USB-C to USB-C)
Oculus PC App
Meta Quest Mobile App (First time setup only)

Meta Software

First Time Setup

Only for headsets not already setup for development.
Install the Meta Quest mobile app for or
.
Create or sign into a developer account in-app.
Pair the headset by enabling Bluetooth on the mobile device and powering on the headset, then selecting pair in the app.
Wear the headset and follow the instructions to finish the setup.
In the mobile app, select Menu > Devices > Headset Settings > Developer Mode and toggle this option on.

PC App Setup

Download and install the .
Follow the install instructions and login with your Facebook account or Meta developer account (same as mobile app).
Follow on screen instructions to pair the headset via Link Cable.
In the headset, accept the prompt to enable Link.
If successful, the environment in the headset will appear as below.
image.png
The headset and PC are now setup for testing and running applications directly from Unity. Each time you wish to use the headset, enable the Link mode to connect it to the PC.
Further information:

Unity

Installation

Minimum supported Unity version for Meta development is 2021 LTS.
To manage our Unity versions, install .
Install the appropriate Unity version for your project.
image.png
If using your application standalone (built to the headset, no PC connection), ensure you click “Android Build Support”.
Allow the installation to complete, then create a new project using the version of Unity you just installed.
Choose the destination to save the project to, name the project appropriately and select the project type. (usually “3D Core”, for a quick example, choose the “VR Core” template)
image.png

Project Setup and Running in Unity

Starting from a blank “3D Core” project in Unity, we can now install the necessary packages and assign settings to allow us to either run a VR app with the Quest in Unity or build to the headset directly.

Basic VR Camera

Having opened the project, navigate at the top to File > Build Settings > Player Settings > XR Plug-in Management and select “Install XR Plugin Management”.
image.png
Select “Oculus” from the list of plug-in providers. This will install the Oculus XR plugin.
Selecting Open XR at this stage will allow the app to work on other headsets.
Ensuring Link is enabled (white screen visible), pressing “Play” on the project at this point will display the scene in the headset though without proper movement.
To add the proper camera, navigate to the “Hierachy” tab and right click, selecting XR > Convert Main Camera To XR Rig.
image.png
To ensure the camera has worked, you can right click the same area and select 3D Object > Cube to add a point of reference in the scene.
Press “Play” this time and the camera will move with your head and the cube will be positioned in front of you inside the headset.

Adding Interaction

Select Window > Package Manager to open the manager and scroll to “XR Interaction Toolkit”. Install the package. (You may be asked to restart Unity)
image.png
Navigate back to the Package Manager and change the “Packages: Unity Registry” to “Packages: In Project”. Select XR Interaction Toolkit again and select “Samples”, then clicking import on the “Starter Assets”.
image.png
Navigate in the “Assets” window to the path Assets > Samples > XR Interaction Toolkit > VERSION > Starter Assets and open the “DemoScene”.
image.png
This should have opened the demo scene shown below, playing this through the connected headset will give examples of grabbing, gaze and button interaction as well as different types of locomotion (snapping, walking and climbing) and UI examples.
image.png
From here you can explore their implementation and use these in your own scene to allow interactivity.
Further information:

Further Interaction

The implementation described above can be used on different headset brands through . Using this option instead of the provided Oculus XR Plugin can also allow hand tracking use without any Oculus specific plugins, meaning the Unity application can still be as easily shared with other headsets.
Further information:

For the full suite of Meta specific plugins (Voice, Avatars, LipSync, etc), the Oculus Integration plugin can be used from the . This will restrict development to the Meta Quest devices with its implementations.

Building App to Headset


Other Resources


Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.