Getting Started with Varjo XR Plugin for Unity
Adding Varjo XR support to a Unity project
To add Varjo XR support to your Unity project, first open an existing project or create a new one using a render pipeline of your choice. See XR Plugin Compatibility for compatible Unity editor and render pipeline versions.
From the Unity main menu, select Window > Package Manager.
Click the + icon in the top left corner. Select Add Package from git URL and enter the URL for the Varjo XR plugin repository: https://github.com/varjocom/VarjoUnityXRPlugin.git. If you have a local copy of the XR plugin, you can select Add Package from disk instead.
In the Project Settings dialog, select the XR Plugin Management tab and check Varjo in the Plug-in Providers list.
The Varjo XR plugin is now enabled in your project. You can modify the plugin settings in the Project Settings dialog under the XR Plug-in Management tab and Varjo.
See Rendering Settings for a detailed description of the available settings.
To enable HMD tracking for the camera, select Game Object > XR > Convert Main Camera To XR Rig from the Unity main menu.
Alternatively, you can select the Main Camera of the scene and add the Tracked Pose Driver component manually. Make sure that the Device dropdown in the component is set to Generic XR Device and Pose Source is set to Center Eye – HMD Reference. The Main Camera will now follow the HMD position and rotation.
Create a new Volume Profile and add it to the scene as a global volume. Add the following overrides:
- Exposure : mode = Fixed (fixed exposure value can be adjusted based on scene)
- Bloom : Intensity = 0
- Ambient Occlusion : Intensity = 0
For further reccommendations on post-processing effects, see Post-processing
Additional configuration options and information on migrating an existing Unity project can be found in the official Unity documentation: Configuring your Unity Project for XR.