Unity supports XR development through its plug-in framework and a set of feature and tool packages. Go to the XR Plug-in Management category in Project Settings to enable XR support in a Unity project and to choose the plug-ins for the XR platforms that your project supports. Use the Unity Package Manager to install the additional feature packages.
The following diagram illustrates the Unity XR plug-in framework structure and how it works with platform provider implementations:
XR subsystems define a common interface for XR features. XR plug-ins implement these subsystem interfaces to provide data to the subsystem at runtime. Your XR application can access data for an XR feature through Unity Engine and package APIs. Please note that the diagram doesn’t show a comprehensive list of XR subsystems.
An XR provider plug-in is a Unity plug-in that supports one or more XR device platforms. For example, platform-specific vendor plug-ins include Unity OpenXR: Meta (for Meta Quest devices), Unity OpenXR: Android XR (for Android XR devices), and the Apple visionOS XR plug-in, which support their respective device ecosystems.
An XR provider plug-in implements one or more interfaces called subsystems. Typically, a provider plug-in uses the device platform’s system-level libraries to implement the Unity interfaces for its devices.
Note on Input Architecture: There’s a structural separation within the input tech stack. The Unity Engine team manages the higher-level cross-platform input tech stack (via the Unity Input System), while the XR platform plug-ins own the low-level, platform-specific input code for their respective devices.
Unity uses subsystem interfaces to communicate with providers for various platforms, powering the XR features of your application. Because of these interfaces, you can reuse the same feature code in your application across all XR devices that have a provider for that feature.
XR subsystems give you access to XR features in your Unity app. Unity defines a common interface for XR subsystems so that all provider plug-ins implementing a feature generally work the same way in your app. Often you can change the active provider and rebuild your app to run on a different XR platform.
The Unity Engine defines a set of fundamental XR subsystems. Unity packages can provide additional subsystems. For example, the XR Composition Layers and XR Hands packages are core packages providing additional subsystem interfaces essential to XR workflows.
The subsystems defined in the Unity Engine include:
| Subsystem | Description |
|---|---|
XRDisplaySubsystem |
Handles display functionalities, rendering, and managing device view configurations. |
XRInputSubsystem |
Provides low-level access to device inputs and tracking data for headsets and controllers. |
XRMeshSubsystem |
Extracts and generates meshes representing the physical environment for augmented and mixed reality. |