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.
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.
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.
Install the appropriate Unity version for your project.
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)
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”.
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.
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)
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”.
Navigate in the “Assets” window to the path Assets > Samples > XR Interaction Toolkit > VERSION > Starter Assets and open the “DemoScene”.
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.
From here you can explore their implementation and use these in your own scene to allow interactivity.
. 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.