Custom Controller Project
Custom Controller Project
The developer package includes an Android Studio project to build a custom controller archive that can be later used instead of the default included controller archive inside the Snapdragon Spaces Unity package or Unreal Engine plugin.
To change the appearance of the controller, open the project with Android Studio (2020.3 or later recommended) and open SpacesController > res > layout > custom_input_companion_controller.xml. The class located under SpacesController > java > com.qualcomm.snapdragon.spaces.spacescontroller.SpacesCustomInputContentViewFactory will be the one that will overwrite the controller inside the Spaces Services application. If IDs in the layout file or other values declared under the SpacesController > res > values path are about to change, their respective counterparts in the previously mentioned class should also be managed accordingly to avoid any linking errors.
To build a custom controller archive that can be used in either the Snapdragon Spaces Unity package or Unreal Engine plugin, run the assemble
task of the SpacesController
module located in the Gradle window (open View > Tool Windows > Gradle) under SpacesController > Tasks > build or run gradle assemble
in the projects root from the command line on Windows or ./gradle assemble
on macOS/Linux.
If the build succeeds, one of the generated archives (either release or debug) archives located under SpacesController > build > outputs > aar can be used in one of the next steps: