Skip to main content

Dual Render Fusion Setup Guide

This guide will explain in detail how to get started with the Snapdragon Spaces SDK in Unity to enable Dual Render Fusion.

Prerequisites

VERSION

Please note that the recommended Unity Editor version to work with Snapdragon Spaces is 2021.3 LTS (starting with 2021.3.16f1). Later versions of the Unity Editor have not been extensively tested and may not work as effectively.

The Android Build Support module must be added when installing the Unity Editor to be able to export .apk files. The module can also be added afterward through the Unity Hub.

This guide assumes you have a Snapdragon Spaces project which has been configured according to the initial steps laid out in the Unity Setup Guide.

PREVIOUS VERSIONS

This guide is applicable to Snapdragon Spaces SDK for Unity version 0.23.0 onwards.

From Snapdragon Spaces SDK for Unity version 0.13.0 to version 0.21.0, Dual Render Fusion public beta was available as an optional add-on package.

tip

Information about setting up a Dual Render Fusion project using an older version of the optional add-on package can be found on the Version 0.13.0 to 0.21.0 page.

tip

Information about migrating a project using an older version of Dual Render Fusion to the latest integrated version of the feature can be found in the Dual Render Fusion Migration Guide.

Import the Samples

The Snapdragon Spaces SDK package comes with additional sample assets to showcase how to use Dual Render Fusion. To import them, simply pick the package in the package manager (located in the menu bar under Window > Package Manager) and click import on the Fusion Samples.

Import Fusion Samples

Once imported, the following scenes are available to showcase different aspects of the Dual Render Fusion feature:

Dual Render Fusion Samples
  1. Controller Prefab Sample Scene - a sample scene used for adapting the Android Companion Controller for Snapdragon Spaces into a Unity Prefab, with full control over the Settings and Exit button. See Companion Controller for more details.

  2. LandscapeUISampleScene - a simple scene with a Landscape Canvas containing interactable Canvas UI elements to manipulate a cube.

  3. OpenXRLoadingTest - a scene demonstrating allowing an app to start up immediately on the smartphone and then enabling OpenXR upon establishing a connection with the glasses. See Dynamic OpenXR Loader below for more details.

  4. PortraitUISampleScene - a simple scene with a Portrait Canvas containing interactable Canvas UI elements.

Enable the Dual Render Fusion (Experimental) feature

Navigate to Project Settings > XR Plug-in Management > OpenXR (> Android Tab) and enable the Dual Render Fusion (Experimental) feature.

XR Plug-in Management

Change the project settings

Configure Fusion project menu item

Using the menu item Snapdragon Spaces > Dual Render Fusion > Configure Fusion project is the easiest way to configure the project settings for use with Fusion.

This will adjust the project settings as follows:

  • Disable Initialize XR on Startup under Project Settings > XR Plug-In Management > (Android settings tab).

    XR Plug-in Management
  • Under Project Settings > XR Plug-In Management > OpenXR > Base Runtime feature settings (gear icon):

    XR Plug-in Management
    • Disable Launch App On Viewer.
    • Disable Launch Controller on Host.
    • Disable Export Headless.
  • Sets the Active Input Handling value under Project Settings > Player > Other Settings > Configuration to both. This allows use of the new Input System package in parallel with the legacy Input System.

  • Adjusts the Product Name and Version values under Project Settings > Player to add the suffix -Fusion. This allows the products built with Dual Render Fusion to be more easily identified during development.

  • Adjusts the Package Name value under Project Settings > Player > Other Settings > Identification to add the suffix .fusion.

tip

If adjusting the project settings manually, it is not required to make the adjustments to Product Name, Version and Package Name.

The Active Input Handling change is highly recommended for most use cases.

All other changes are required for Dual Render Fusion to function correctly.

NOTE

If these settings need to be (re)applied manually, and the Initialize XR on Startup checkbox cannot be disabled, navigate to Assets > XR > XRGeneralSetings > Android Settings.

Android Settings (XR General Settings)

Here, disable Init Manager On Start.

Android Settings (XR General Settings)

Apply Project Validator Fixes

Navigate to Project Settings > XR Plug-in Management > OpenXR > (Android Settings tab) and find the Dual Render Fusion (Experimental) feature. Click on the gear icon to open the feature settings.

OpenXR Features including new Fusion Feature

Enable Validate Open Scene to run project validators for the current scene.

OpenXR Features including new Fusion Feature
NOTE

Disable Validate Open Scene when done with this step.

Leaving the setting enabled can cause problems in automated build environments. See Configure Dual Render Fusion Settings for further details.

Click on the red exclamation point next to Dual Render Fusion to open the Project Validation window.

OpenXR Features including new Fusion Feature

The Project Validation window will show several Fix options for updating both the Unity Project and the currently open scene, so ensure that the correct scene is open in the project.

Dual Render Fusion Features Validator
NOTE

If the Dual Render Fusion is showing an exclamation mark but no related options appear, reimport the script Packages > Snapdragon Spaces > Runtime > Fusion > FusionFeature.FeatureValidators to fully re-process the project validation files.

Fusion Feature Validator Script LocationFusion Feature Validator Reimport

At this point, Dual Render Fusion should be properly enabled for launching.

For a new project, the scene hierarchy should now contain additional game objects:

Scene Hierarchy

Additional information about these game objects and the attached components can be found on the Components page.

tip

For developers with an existing Snapdragon Spaces project who want to transition to using Dual Render Fusion, see the Companion Controller section for an easy way to get started without changing the functionality of the application.

Configure Dual Render Fusion Settings

Available settings for the Dual Render Fusion feature include:

Dual Render Fusion Settings
  1. Validate Open Scene - when this setting is enabled, the Project Validation window will check if the current scene is configured correctly to work with Dual Render Fusion. Disable this setting if the project's build system doesn't have a full-feature scene (like an additive scene) to avoid build blockers.
  2. Simulate Fusion Device - if enabled, when entering Play Mode the editor will behave as if there are two valid screens: Display 1 will be the Dual Render Fusion host view (smartphone screen), and Display 2 will be the AR viewer (headset screens). If disabled, when entering Play Mode the editor will behave as if the connected device can only display XR content (as an MR/VR all-in-one device). This setting requires a Fusion Simulator component to be present in the scene. See Fusion Simulator component for further details.