Porting An Existing App

Like all major XR headsets, the Xcelerate (CVR-655) supports the OpenXR API. More information on OpenXR is available here - OpenXR Key Concepts

This guide assumes your app is already targeting OpenXR, please email your technical contact if this is not the case.

The Xcelerate (CVR-655) uses the Snapdragon Spaces runtime, which supports OpenXR version 1.0.

The Snapdragon Spaces SDK is not required, and is not recommended unless your app is already using it. If your app is already built using the Spaces SDK, it should be compatible with Xcelerate (CVR-655).

Loader

To run on CVR-655, your app must include the Khronos OpenXR loader. The loader Unity builds into your APK is configured in the OpenXR Feature Groups section in Project Settings (Edit -> Project Settings -> XR Plug-in Management -> OpenXR).

OpenXR features can include a custom loader library which overrides the default (Khronos) loader.

For example, the "Meta Quest Support" feature includes the Meta Quest OpenXR loader, which will be used if the feature is enabled.

Likewise, other manufacturers provide plugins which add features to this list and cause their loader to be used. If you have multiple features enabled which change the loader, Unity will log an error such as Only one OpenXR feature may have a custom runtime loader per platform.

If no features with a custom loader library features are enabled, Unity will use the Khronos loader. This loader is compatible with almost all OpenXR headsets.

Not all feature checkboxes change the loader. Those that do usually contain the name of a headset or manufacturer.

Additional Resources

Extensions

OpenXR enables headset vendors to specify extensions unique to their products. These vendor extensions will not be available when running on headsets from other manufacturers.

The CVR-655 supports most common OpenXR extensions. Any extensions unique to other vendors must either be disabled or made optional when porting your app.

The extensions in use are configured in the OpenXR Feature Groups section in Project Settings (Edit -> Project Settings -> XR Plug-in Management -> OpenXR). Note that one OpenXR feature in Unity may correspond to multiple extensions.

The OpenXR Feature Groups checkboxes to the left provide a convenient way to enable/disable all features belonging to a particular vendor.

Additional Resources

Input

Unity has a flexible OpenXR input system, which usually handles various XR controllers with little or no configuration.

OpenXR interaction profiles specify the inputs (and haptic outputs) for various controller types. They can be configured in the "Enabled Interaction Profiles" list in Project Settings (Edit -> Project Settings -> XR Plug-in Management -> OpenXR).

While there are many interaction profiles, most modern controllers are compatible with the Oculus Touch Controller Profile, which is enabled by default in Unity (docs). This interaction profile is recommended for use with the CVR-655 controllers.

Additional Resources

Camera Rig

Some headset vendors provide custom camera rigs which are incompatible with CVR-655.

Unity provides various XR Origin prefabs that are compatible with most headsets. We recommend the "XR Origin (XR Rig)" prefab available in the XR Interaction Toolkit Starter Assets sample. Once you have imported the sample, this can be found in Assets/Samples/XR Interaction Toolkit/<version>/Starter Assets/Prefabs/.

Additional Resources

Hints And Tips

Build Profiles

Unity 6 adds Build Profiles, which allow you to specify multiple different configurations (e.g. scripting defines, Player settings, scene lists) for the target platform. This can make it easier to create a single project that targets multiple XR headsets.

For example, you could use custom scripting define symbols to conditionally compile code for specific headsets.

While Build Profiles allow you customise Platform and Player settings, no other Project settings can be overridden. This means you cannot customise OpenXR settings using Build Profiles.

Android Logcat

Logcat allows you to view Android logs, which can be useful for tracking down compatibility issues. Unity provide an Android Logcat package which enables logcat viewing in the editor. You can also use Logcat via the command line, Android Studio, or other tools.

When a Unity OpenXR app launches, an OpenXR diagnostic report is produced which can be viewed with Logcat. This provides lots of useful information for diagnosing OpenXR issues.

Last updated