Improved Guidance for Unreal Developers
Oculus Developer Blog
Posted by Stan Stringellow
June 13, 2018

We're always working to improve our tools and support of the developer community, and your feedback is an invaluable piece of that. One of the most-requested changes is better guidance for developers using Unreal Engine to create games and apps for Oculus devices. To respond to this, we have created a significantly expanded and improved version of the Oculus Unreal Developers Guide. The guide is located here:

App development and portability

In the new Unreal guide, workflows are organized by product, such as Oculus Go. This makes it easy to follow along with the development process for the particular headset that you are targeting:

Portability issues are also emphasized, so that you can more easily take advantage of the features that are common across the headsets, for example when porting an Unreal app from Oculus Go to the Oculus Rift. This is a double-edged sword, however, since each headset also provides unique features which only work on that particular product. For example, Oculus Go is the only headset that allows you to switch the display refresh rate between 60 Hz and 72 Hz. This feature enables your apps to utilize the higher quality 72 Hz refresh rate whenever possible, while downgrading to 60 Hz when necessary for sections of the app that involve more expensive rendering operations. You can switch between refresh rates whenever necessary, even on a per-frame basis to adapt to varying scene complexity. The Oculus-Unreal integration provides Blueprints that make this feature easy to add to your Oculus Go apps. However, if you plan to port that application to Gear VR (which only supports a 60 Hz refresh rate), you will not be able to use this feature on that headset.

These details are very important to understand for a number of reasons. For example, the Oculus Store does not allow dual APKs for an application that targets both the Oculus Go and the Gear VR. All functionality must exist within a single APK. We designed the new Oculus Unreal Developers Guide to help developers to spot these kinds of portability issues, and plan for them early in the development process.

Controller input events

The new Unreal guide provides significantly expanded and enhanced content that helps you to map input actions from all supported controllers to the corresponding Blueprints events. Here are two examples:

As with other aspects of the Oculus VR API, there is a significant commonality across the product lines. This makes it easier to support different controllers within a single app, or to port an app from one product to another. But, there are cases where the API nomenclature is tied to legacy products. So, for example, Blueprints events that are labeled as “Thumbstick” for Oculus Touch controllers, are re-mapped to the touchpad on the Oculus Go and Gear VR. This re-mapping is logical, given the varying physical means that different controllers use to accomplish identical actions. It can be challenging to understand all of these mappings to apply them across products, and the new Unreal guide is intended to make this task easier.

Another issue is that Oculus utilizes the standard Unreal MotionController API whenever possible. This enhances portability, even across PC games and Oculus VR controllers. However, the Oculus VR controllers support input actions that are not available within the standard MotionController framework. Oculus-specific Blueprints are provided to handle these input actions, and the new Unreal guide clarifies which APIs should be used under which circumstances.

The new Unreal guide provides a thorough reference for all controller input events across all products. The guide is designed in such a way that you should be able to easily determine which Blueprints should be used for the controller you are targeting. At the same time, the guide makes it easy to see how those mappings apply across controllers (for the currently available headsets and, eventually, future headsets as well).

Blueprints Reference

The new Unreal guide provides a thorough reference for all Blueprints in the Oculus Library, including their arguments and outputs. Here is an example:

This part of the guide can be useful for C++ developers as well, since it contains a lot of descriptive content that is not available in the C++ header file.

And More...

Unreal developers have been asking for more support around revenue generation and social experiences, including functions such as:

  • In-App Purchases
  • Leaderboards
  • Achievements

While Oculus does not yet provide Blueprints to support these functions, it is possible to add these functions to your Unreal apps by using C++ to call the Oculus Platform API functions. The new Unreal guide clarifies this issue, provides context, and points you in the right direction by providing links into the related Oculus Platform documentation.

The new Unreal guide also adds enhanced content for a host of other topics, including:

  • Quickstart Guides
  • Oculus Dash
  • Splash Screens
  • Rendering (e.g. various forms of foveated rendering, multi-view rendering, etc.)
  • And more

This is just one of many steps we're taking to improve support for the Unreal community. Next, we're planning to expand our code samples and provide more extensive Blueprints support for social experiences. Thanks for your feedback — we're listening. Be sure to share suggestions and feedback in the forums.