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
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.
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.
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.
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
.
Once imported, the following scenes are available to showcase different aspects of the Dual Render Fusion feature:
![Dual Render Fusion Samples](/assets/images/fusion_sample_scenes_list-fefd1a11b9d36c8076b10b911d1a7445.png)
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.
LandscapeUISampleScene - a simple scene with a Landscape Canvas containing interactable Canvas UI elements to manipulate a cube.
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.
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](/assets/images/fusion_enable_experimental_feature-adc1e670547a4fa05e3601082e763f6f.png)
Change the project settings
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)
.Under
Project Settings > XR Plug-In Management > OpenXR > Base Runtime feature settings (gear icon)
:- 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
.
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.
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)](/assets/images/xr_android_settings-d6ae896222c353aeb2c3ae9a859f2b0d.png)
Here, disable Init Manager On Start.
![Android Settings (XR General Settings)](/assets/images/Init_manager_on_start-359474d9c333c9d5c9bbf7a1afe66717.png)
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.
Enable Validate Open Scene to run project validators for the current scene.
![OpenXR Features including new Fusion Feature](/assets/images/fusion_validate_open_scene-5a3ddd8e3668c77f140adb66f74c219f.png)
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](/assets/images/fusion_validation_required-d114f3cab7c8f152fa996707bf32fe50.png)
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](/assets/images/fusion_validators_before_fix-a6050e144d390d9232da90612d48c9d0.png)
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 Location](/assets/images/fusion_feature_validator_script-637afd67ad8b2cef722a2c534b993295.png)
![Fusion Feature Validator Reimport](/assets/images/fusion_feature_validator_reimport-46c7c8369a8e407ce85c62cb02049570.png)
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](/assets/images/fusion_new_scene_objects_post_validation-f8e26cd124977ece9305d8de7c6878d4.png)
Additional information about these game objects and the attached components can be found on the Components page.
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](/assets/images/fusion_feature_settings-59658c4278fbf63642096d62b11933f8.png)
- 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.
- 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.