Unity WebXR Exporter Update
We are happy to release an updated version of our Unity Exporter. It now supports WebXR, the new cross browser API for VR and AR on the web. Unity is a great tool for building cross platform experiences, and this plugin expands the list of available targets. Take your existing VR app to the web and reach new users easily across desktop and mobile headsets. It also has support for running in a traditional browser outside of a VR headset which you can use to progressively add VR functionality to your games or apps.
Using the plugin
You can download the package from the Unity asset store or as a unitypackage file from github. The included documentation will guide you through the process of integrating the plugin.
The package also includes a sample scene to demonstrate how to set up your project. You can check out a published version of the desert sample.
Projects using past versions of the package have a simple path to upgrade as the architecture of the plugin remains the same. Wherever you were using WebVR scripts and prefabs, you can now use the corresponding WebXR versions.
Unity does not yet support single pass VR rendering when using WebGL. Materials and shaders will have an impact on the performance of your application. We recommend using the Universal Render Pipeline (URP), previously known as the Lightweight Render Pipeline (LWRP), in your project to achieve good performance, especially when targeting mobile VR headsets like the Oculus Quest.
The new package has verified compatibility with Unity version 2018.4 (LTS), and all versions of 2019. Support for Unity 2020 is planned once the new Unity APIs settle down.
The new exporter includes the WebXR polyfill so you can use it right away in browsers which don’t support the WebXR API but do have WebVR.
Share your work with us using #webxrexport on Twitter and don't forget to include #madewithunity.
The plugin is open source, available under the Apache 2 license, on GitHub. There you can view or file issues, and submit pull requests to contribute. Be sure to follow this blog for future updates about the plugin.
This plugin is a continuation of the work started several years ago by Casey Yee for WebVR. Brian Turner and Fernando Serrano upgraded the plugin to support WebXR.
Special thanks to Oren Weizman whose hints were quite useful to fix some important issues.