Unity XR/VR Setup Not Working - Virtual Reality Development Fix
Problem: You are trying to set up XR or VR in Unity but the headset is not detected, the XR plugins do not load, or your VR build does not run correctly. The Editor may show "No XR display detected" or the game runs in a window instead of in the headset.
Quick Solution: The most common causes are missing or disabled XR Plugin Management, the wrong build target (e.g. PC instead of Android for Quest), or an unsupported/outdated XR plugin. Install or enable the correct XR plugins for your platform and ensure the project is configured for your headset.
This guide walks you through the main causes and fixes so you can get Unity XR/VR working for development and builds.
Why Unity XR/VR Setup Fails
XR (Extended Reality) and VR in Unity depend on:
- XR Plugin Management – The package that loads the correct XR SDK (OpenXR, Oculus, Windows Mixed Reality, etc.).
- Platform-specific plugins – For example Oculus (Quest), SteamVR (PC VR), or OpenXR for multiple runtimes.
- Correct build target – Quest requires Android; PC VR requires Windows (and sometimes specific API levels).
- Headset and drivers – The device must be connected, powered, and have the right runtime (Oculus app, SteamVR, etc.) installed on the host.
When any of these are missing or misconfigured, setup fails.
Solution 1: Install and Enable XR Plugin Management
Unity 2020 and later use the XR Plugin Management package. If it is not installed or the right provider is not enabled, no XR device will be detected.
Step-by-Step Fix
-
Open Package Manager
- Go to Window > Package Manager.
-
Install XR Plugin Management
- Set the dropdown to Unity Registry.
- Search for XR Plugin Management and click Install if it is not already installed.
-
Enable your XR provider
- Go to Edit > Project Settings > XR Plug-in Management.
- For PC (Standalone): Enable OpenXR, Oculus, or Windows Mixed Reality as needed for your headset.
- For Android (Quest): Select the Android tab and enable Oculus (or OpenXR if you use the OpenXR backend for Quest).
-
Restart the Editor
- Close and reopen Unity so the XR plugins load. Then connect your headset and try Play or a build.
Verification: In Project Settings > XR Plug-in Management, at least one provider is checked for your target platform, and after restart the headset is listed or the game runs in VR.
Pro tip: For Meta Quest, use the Oculus XR plugin (or OpenXR with Oculus support) and set the build target to Android. PC-only targets will not detect the Quest as a display.
Solution 2: Set the Correct Build Target
VR platforms require a specific build target. Building for the wrong platform causes "no display" or a flat window.
Step-by-Step Fix
-
Open Build Settings
- Go to File > Build Settings.
-
Select the right platform
- Meta Quest (standalone): Select Android. Switch to Android and click Switch Platform if needed.
- PC VR (SteamVR, Rift, etc.): Select PC, Mac & Linux Standalone and ensure Windows is the target OS.
-
For Android (Quest): Player Settings
- Select Edit > Project Settings > Player and open the Android tab.
- Set Minimum API Level to the value required by the Oculus/Quest documentation (e.g. 29 or higher).
- Under XR Settings (or Other Settings), ensure Virtual Reality Supported is checked if you use the legacy VR setting, or rely on XR Plug-in Management.
-
Rebuild
- Build and run (or use Link/Air Link for Quest with the correct runtime). The app should launch in the headset.
Verification: The built app runs on the target device (Quest or PC VR headset) and displays in the headset, not only on the monitor.
Solution 3: Install the Correct XR Plugin for Your Headset
Different headsets use different plugins. Using the wrong one or an outdated version leads to "no device" or crashes.
Common headset and plugin mapping
- Meta Quest (standalone or Link): Oculus XR plugin (or OpenXR with Oculus support). Build target Android for standalone.
- SteamVR (Index, Vive, etc.): OpenXR with SteamVR runtime, or SteamVR plugin from the Asset Store / package. Build target Windows.
- Windows Mixed Reality: Windows XR Plugin or OpenXR with WMR runtime. Build target Windows.
- Cross-platform (OpenXR): OpenXR plugin; install the OpenXR feature set and the runtime for your headset (e.g. SteamVR or Oculus).
Step-by-Step Fix
- In Edit > Project Settings > XR Plug-in Management, confirm the plugin for your headset is enabled for the active platform (PC or Android).
- If you use OpenXR, open Edit > Project Settings > XR Plug-in Management > OpenXR and add the feature groups you need (e.g. Meta Quest, SteamVR).
- Install the runtime on your PC (Oculus app, SteamVR, or Windows Mixed Reality portal) and ensure the headset is connected and recognized by that runtime before launching Unity or the build.
Verification: The runtime app shows the headset as connected, and Unity Play or the built game runs in the headset.
Solution 4: Headset Not Detected in Editor (Link / PC VR)
If you are developing on PC with a Quest (Link/Air Link) or a PC VR headset and the Editor does not see the device:
-
Confirm the runtime
- Quest Link: Oculus app installed and Link enabled; headset connected via cable or Air Link.
- SteamVR: SteamVR installed and running; headset and base stations on.
-
Run as Administrator (Windows)
- Sometimes USB or driver issues are avoided by running Unity (or the Oculus/SteamVR app) as Administrator. Use only if suggested by the vendor docs.
-
Check USB and drivers
- Use a USB 3 port and a cable that supports data (for Link). Update GPU drivers and, for Oculus, run the Oculus compatibility check.
-
Restart the XR runtime
- Close Unity, quit the Oculus app or SteamVR, then start the runtime again and put on the headset. Reopen Unity and try Play.
Verification: In Play Mode, the Game view or headset shows the VR view and head tracking works.
Alternative Fixes and Edge Cases
- "XR Subsystems failed to initialize" – Usually a plugin or runtime mismatch. Disable all but one XR provider for that platform, restart the Editor, and try again.
- VR works in Editor but not in build – Ensure the same XR plugins are enabled for the build platform (e.g. Android for Quest) and that no build script strips the XR libraries. Check Player Settings > Android > Publishing Settings for minimum API and IL2CPP/scripting backend if needed.
- Multiple XR plugins – Avoid enabling two providers that conflict (e.g. two OpenXR runtimes). Enable only the one required for your target device.
Prevention Tips
- When starting a new VR project, use Unity Hub to create a project with the XR or VR template so the right packages are pre-installed.
- Pin the XR Plugin Management and your headset’s plugin to a version that matches the headset’s documentation.
- Document your target device and build target (Android vs Windows) in your project readme so team members use the same setup.
Related Problems and Links
- If the Quest is not detected in the Editor when using Link, see our Meta Quest Link 2026 Not Detecting Headset fix.
- For Unreal VR setup, see our Unreal Engine guide.
- Official docs: Unity XR Plug-in Management, OpenXR in Unity.
Bookmark this page for quick reference when XR/VR setup fails. If this fix helped, share it with your team or dev friends.
Frequently Asked Questions
Do I need both OpenXR and Oculus plugin for Quest?
For Quest you typically use either the Oculus XR plugin or OpenXR with the Oculus (Meta) feature set. You do not need both; pick one and stick to it for the project.
Why does my VR build show a black screen in the headset?
Often the build target is wrong (e.g. building for Windows when targeting Quest), or the XR plugin is not enabled for that build platform. Set the correct platform in Build Settings and enable the matching XR provider in XR Plug-in Management for that platform.
Can I test VR without a headset?
You can use XR Device Simulator (package) or the Game view with a simulated device in some setups, but full testing (tracking, comfort, performance) requires the real headset.