Cross-platform Management

This package uses a combination of build profiles, wrapping dependency packages in scripting defines, and custom AndroidManifests and Gradle templates to support multiple XR SDKs in the same project. This is a recent capability as of Unity 6.

Getting Started

Supporting multiple XR SDKs in the same Unity project requires handling many settings and permissions. The best way to get started is to use one of our Example Projects, which have these settings preconfigured.

Tools

Class
Description

Injects Gradle packagingOptions to resolve duplicate native libs during Android builds.

Disables platform-specific Android AARs when building for other targets to avoid native lib conflicts.

Automatically selects the correct AndroidManifest.xml template for the active target (METAQUEST, MAGICLEAP, XREAL) before Android builds.

Ensures that Meta camera and passthrough feature permissions are enabled in the AndroidManifest.xml to use the Passthrough Camera Access API.

Automatically wraps XR device SDK files in scripting defines (e.g., #if MAGICLEAP) for multi-device Build Profile support. Runs when Unity compiles.

Last updated