XR Plugins and Subsystems

Platforms Supported Thus Far

  • Oculus (Released June 11th 2019)
  • Windows MR VR (Released June 19th 2019)
  • Windows MR AR (Released July 2nd 2019)
  • Magic Leap (Released July 16th 2019)
  • Google VR (Released July 26th 2019)
  • PSVR (Released August 6th 2019: You can find it via the Unity forum on Sony’s Developer site.)

What’s New
The Unity XR team has been working hard to improve our multi-platform offering, which includes a new plugin architecture. As a result, this changes how settings are stored for AR/VR build targets, and how the SDKs for each supported platform are loaded.

The core part of our new plugin architecture is formed by subsystems. These subsystems implement groups of related functionality (e.g., camera, depth, display, input, etc.) and expose them as low-level managed C# APIs to developers, resulting in the following:

  • More stable, multi-platform APIs
  • Faster updates via the Unity Package Manager (e.g., the “Oculus XR Plugin” package is able to be updated outside of major Unity editor release cycles)
  • Simpler multi-platform development

AR Foundation, the recommended approach for building AR applications on handheld devices, was also built upon this new architecture. We will be adding support for other devices that support AR features in the future.

Starting with Unity 2019.2, there will be new preview packages for our supported AR/VR platforms that use the new plugin architecture, with the goal of being production-ready by Unity 2019.3. We plan to deprecate the integrated AR/VR packages in Unity 2019.3.

Developing for AR/VR Platforms on Unity 2019.2

Using The New Plugin Architecture
The new plugin architecture has changed how Unity loads and manages SDKs of your target platforms. To use the new packages, do the following:

  • These package are preview packages, so you will need to enable the ability to see preview packages first. In the package manager menu, there is an “Advanced” drop-down by the search bar. Open it, and you will see “Show Preview Packages”. This should make the XR Management package appear. If you still don’t see it, you may need to switch to “All Packages”, in the drop-down below the Packages tab.

  • Download the XR Management package from Package Manager

  • Download the Loader for each SDK/platform you want to build for (e.g., the Oculus Loader)

  • Select the target SDK/platform from Available

Instead of going to Player Settings as a first step, the settings for XR and SDKs will now appear under Project Settings. The XR Management package will now serve as the main entry point for loading the right package for each target SDK/platform and managing respective settings. XR Management is also needed to make the XR Settings show up in Project Settings. Once downloaded, the XR Management package will take you to Project Settings, where loading and management of supported XR platforms takes place (see screenshot below).


Download the loader.


Install the downloaded loader.

The Tracked Pose Driver is now recommended for camera tracking:

  • Add a Tracked Pose Driver component to the main camera game object in your project.
  • Set the Tracked Pose Driver to use the “Center Eye” as the pose source, and untick the “Use Relative Transform” option.

Using Integrated Platforms
We want to note that the integrated XR platforms are still available in Package Manager. These packages will remain as is, but we encourage you to download the XR Management package and try the new XR plugins. You may not be able to use Legacy VR if you have XR Plugins installed, as some plugins may disable Legacy VR to prevent users from using two at the same time.

Roadmap
Over the next few weeks, we plan to release more implementations for Unity’s other supported XR platforms under the plugin architecture as preview packages. These include the Windows MR, Magic Leap, Google Daydream, and Google Cardboard XR Plugins. During this time, we’ll be looking for early testers and feedback to get these packages in production-ready state.

We plan to have XR plugins for most of our supported XR platforms in production-ready state by the release of Unity 2019.3 later this year (Windows MR and Magic Leap XR Plugins will likely remain in preview).

Let Us Know What You Think
The main goal of this preview release is to gather feedback on how the new plugin architecture is working for you so we can fine-tune the subsystems and workflows to fit your needs. Please provide input via this quick survey or ask questions in this forum.

Developer Notes:
D3D11 for Desktop, and OpenGLES3.0 for mobile are currently the only supported graphics APIs for the Oculus XR Plugin preview. Please note: the default graphics API for new mobile projects is Vulkan (which will be supported in the near future), so be sure to revert to GLES3.0 before deploying to your device.

3 Likes

Known Issues:

  • The Oculus Integration utilities from the Asset Store are not currently fully supported when using the Oculus XR Plugin.

  • Quest and Rift S controllers report a “Thumbrest” usage, which they do not have.

  • The Oculus XR Plugin is failing some publishing validation tests:

  • VRC validator test

  • TestSubmitFramesWhenNotVisible

  • TestResponseToRecenterRequest (fails on Integrated XR as well)

  • TestAppShouldQuit

  • The camera is in a different position when entering play mode compared to Legacy XR when using the Tracked Pose Driver.

  • It is possible to work around this by:

  • Create an empty game object

  • Set it at 0, 1, -10 (the default camera location)

  • Make the camera a child of this game object, set camera transform to 0, 0, 0.

  • Enter playmode and camera is now in the expected location

  • Changing the render viewport scale and opening the Oculus dash while depth and dash support are enabled causes unexpected rendering artifacts

  • XRDevice API values are not populated (Documentation)

  • Rift S is not fully supported.

  • The view is not landscape locked when deploying to GearVR in developer mode.

  • The Lightweight Render Pipeline has shadow issues when using Single Pass Instancing on desktop.

  • Occlusion meshes aren’t enabled yet.

  • In certain situations, eye textures may not destroy correctly, potentially resulting in a crash. This usually only happens if eye textures are created and destroyed repeatedly.

2 Likes

I installed Unity 2019.2.0b6 (under Windows), but see no “XR Management” package inside the Package Manager. Nor do I see the new “XR” category under Project Settings. I do see that there is a “Built-in package” titled “XR”, but this does not seem related to the “XR Management” tool cited above. Do I need a different (alpha?) build of 2019.2 for this? I tried 2019.3.0a5 as well. No sign of the XR Management package.

same question, where to start when trying to build a VR project. there is no lightweight VR template nor is the documentation leading anywhere, see question concerning the XR Management

2 Likes

The package is a preview package, so you will need to enable the ability to see preview packages first. In the package manager menu, there is an “Advanced” drop-down by the search bar. Open it, and you will see “Show Preview Packages”. This should make the XR Management package appear. If you still don’t see it, you may need to switch to “All Packages”, in the drop-down below the Packages tab.

Does the normal Oculus (Android) package support native virtual reality for the Quest?’ Or will the support for the Quest with native VR only be available through this workflow? :slight_smile:

2 Likes

The “Oculus (Android)” package does support Quest. That package will be deprecated in the future in favor of this new workflow.

3 Likes

Was able to get the package installed and the loader downloaded/selected, and the tracked pose driver set up, but when i attempt to play I get 'Unable to start XR SDK Oculus" and some failed messages. Also tried doing a build and the app just crashes.

Using 2019.3.0a6 in a new project.
Oculus@0.8.4-preview

Is there some setup I’m missing?

4695410--443009--Untitled.png

2 Likes

Hi Robert, I’m curious: is the Oculus runtime app open when you try this?

I don’t even have it installed on my desktop. Working on deploying to the GO.

So asking about the desktop prompted me to check my XR plugin management settings for desktop, i had the Oculus Loader in there and in the android. i removed the desktop one, and the errors dont show up anymore, but deploying to the GO the app still crashes before anything shows. click app → black screen → app to app selection

1 Like

Sanity checked myself, brand new project, install xr package manager, download oculus loader, add tracked pose driver, build, install. app started, head is tracking, but there was no splash logos.

should we get both ARCore and Google Cardboard VR support for 6dof on mobile devices?

How will hand gestures be handled for the different platforms be handled by the new InputSystem?

1 Like

Is it possible to create our own XRSubsystem for e.g. custom hardware prototyping?

Edit: I’ve done some research and it doesn’t yet seem to be fully possible. I’ve taken a look at the WMR implementation because that’s the platform I’m most familiar with, and some of the things (e.g. XRDisplaySubsystem) seem to be implemented in native code with no documented public interface.

Now the question is, what’s the roadmap for this? Are you planning to expose this to developers so we can create e.g. our own display subsystem to take advantage of the stereo rendering stack and other Unity XR features?

3 Likes

I created an empty project of 2019.2.0b7 on Mac OS. Installed XR Management. Downloaded Oculus Loader and it is showing an error :“Legacy XR is currently disabled. Unity has detected that you have one or more XR SDK Provider packages installed. Legacy XR is incompatible with XR SDK. Remove all XR SDK Packages from your project to re-enable legacy XR”.

“Virtual Reality Supported” checkbox under Player->XR Settings has been disabled due to the same error…

4 Likes

Just to get this right: this package doesn’t support Steam VR yet?

Correct, OpenVR is not available as an XR Plugin at this time.

1 Like

External developers are currently still not able to create their own plugins for custom hardware that would plug into Unity’s XR system, right?

Related to @holo-krzysztof 's question.

2 Likes

Hey @holo-krzysztof and @pm32847 , right now it’s not possible to create your own subsystem. We’ll comment further if that changes in the future.