With SDK releases 1.31 and 1.35, the Oculus Integration for Unity features experimental cross-platform support, allowing developers to streamline their development cycles and more easily bring their apps to the Oculus Store and other platforms, including those that utilize the OpenVR standard.
Almost all of our Unity developers currently use the Oculus Integration to build Rift apps. But, until now, developers could only use these tools to publish to each of the Oculus Stores. With this new experimental release, we are enabling developers to build apps that can target multiple platforms, with potentially little to no extra work required.
The Oculus Integration for Unity is now one of the only Unity virtual reality frameworks to allow developers to build cross-platform applications with minimal additional work.
We're committed to making it easier to help developers build for and target the broadest audiences possible. Now, instead of requiring separate development cycles, developers will be able to put all of their work into one project and then separately package it to ship onto multiple stores with very little additional work.
When developers can reach more users, no matter what platforms those users are on, the entire VR community benefits. With this update, we hope to make developer workflows smoother, help developers save time and resources, and allow them to focus on what's really important - creating amazing content.
We've listened to the developer community and learned that one of the biggest pain points in VR development has been the sheer volume of duplicated work required to ship an app on multiple platforms. So we wanted to try and do as much of the work as possible as a starting point, creating a feature set that works out of the box on both the Oculus and OpenVR platforms, and then allowing developers to extend it.
If you've used our Oculus Unity Integration, good news: we've simply extended the exact same APIs and added cross-platform capabilities. Drag in an OVRCameraRig prefab, and your HMD and motion controllers are instantly tracked on either platform. For controller inputs, OVRInput works in the exact same way it always has for Oculus Touch controllers and has now been extended for the Vive wands as well. Our haptics APIs are also extended with OVRInput.SetControllerVibration() now supporting OpenVR.
It's important to also note that the Oculus Store publishing process and requirements have not changed, as this feature is meant purely to streamline development. For a completely in-depth overview, take a look at our Unity Cross Platform Development Documentation.
We know that experienced developers will be itching to extend the API in all kinds of ways. A lot of developers enjoy having low-level control over every API they use. We want to stress that even though this cross-platform API provides a set of functionalities that work out of the box on multiple platforms, developers will also have the freedom to customize how their app behaves on any single platform. We have a property in OVRManager called “loadedXRDevice,” for example, that allows platform-specific responses to be easily tuned. If you want to call directly into OpenVR, we've also bundled openvr_api.cs, under our OVR.OpenVR namespace.
Some developers will opt to only use functionality that instantly works identically on all platforms. Others might call directly into OpenVR for all of their functionality when the loaded device is OpenVR. Ultimately, developers will be able to choose exactly where they fall on this spectrum. They can either opt for an abstraction to avoid platform-specific details, for full control of these details, or anywhere in between.
This API is currently experimental and will see future iterations based on feedback from the developer community. Feedback is extremely welcome, so please contact us if you believe any part of this cross-platform offering could be strengthened. We hope that this makes your developer workflow just a little bit easier and ultimately enables you to reach more users!