Unity VR Quick Start Guide
This is a brief and opinionated step-by-step guide for how to get VR working in a new Unity project.
We're going with the Unity XR Plugin API, because it lets us support multiple VR headset vendors without rewriting any code.
- Install the "OpenXR Plugin" Unity package through the package manager.
- Also in the package manager click
+
->Add package from Git URL
and paste incom.unity.xr.interaction.toolkit
. - Expand
Samples
and import theDefault Input Actions
- In the project view, search for
XRI Default
and click theAddToActionBased*
button in the inspector for all the entries. - Go to
Project Settings
->XR Plug-in Management
and tick theOpenXR
checkbox. - A warning should appear next to
OpenXR
, click it and thenFix all
. - Click
Edit
on the last remaining warning. - Add interaction profiles for the headsets you want to support.
- Click
GameObject
->XR
->XR Origin (action-based)
. - Click the
XR Origin
and add aInput Action Manager
to it. - Add
XRI Default Input Actions
to the list ofAction Assets
. - Press play and hopefully it should work.