The purpose of this package is to provide OpenVR rendering to Unity XR. This package provides the necessary sdk libraries for users to build Applications that work with the OpenVR runtime. The OpenVR XR Plugin gives you access to rendering on all major VR devices through one interface. Explicit support for: HTC Vive, HTC Vive Cosmos, Oculus Rift, Oculus Rift S, Oculus Quest (Link), Windows Mixed Reality, and Valve Index. Other SteamVR compatible devices are supported though may have inaccurate or incomplete features. See our QuickStart guide.
This project is under the BSD 3 Clause license (/LICENSE) except the unity headers in the CommonHeaders/ProviderInterface folder, where you'll find the Unity Companion License (/CommonHeaders/ProviderInterface/LICENSE.md)
There is some brief documentation included with this plugin at /Documentation~/com.valvesoftware.unity.openvr.md
As part of our commitment to OpenXR we will begin targeting the OpenXR API in future versions of our game engine plugins.
For now, to get access to controllers and other forms of input you will need to install the beta version of the SteamVR Unity Plugin. This can be found at (https://github.com/ValveSoftware/steamvr_unity_plugin/releases/tag/2.6.0b4).
There is a C# project in /com.valve.openvr which is the unity package that does the high level loading and configuration for the plugin. It also manages OpenVR Events. We've included pre-built DLLs in this package for ease of access.
For developers not building this package from source we have a separate Installer package which adds a scoped registry to your project's package manifest and then installs the OpenVR Unity XR Plugin from npm. This also lets you easily upgrade the plugin within the unity package manager. The code for this installer lives in the Installer branch.
Clone this GitHub repo to your local machine
Open a Powershell window in the root directory of your cloned repo
Run CMake to generate appropriate build files, such as:
cmake -G "Visual Studio 16 2019" .
cmake -G "Visual Studio 16 2019" -A Win32 .
cmake -G "Visual Studio 15 2017 Win64" .
(Optional) Compile the runtime using CMake. Make sure you have MS Visual Studio 2017 or 2019 with C++ support installed:
cmake --build . --target ALL_BUILD --config Debug
cmake --build . --target ALL_BUILD --config Release