# Cross-platform Management

{% hint style="warning" %}

## 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.

We highly recommend starting with an [Example Project](https://docs.meshmap.com/unity-sdk/overview/example-projects) and carefully following the instructions for each device ([Magic Leap 2](https://docs.meshmap.com/unity-sdk/xr/cross-platform-management/magic-leap-2), [Meta Quest 3](https://docs.meshmap.com/unity-sdk/xr/cross-platform-management/meta-quest-3), and [XREAL Air 2 Ultra](https://docs.meshmap.com/unity-sdk/xr/cross-platform-management/xreal-air-2-ultra)) to ensure your app works properly.
{% endhint %}

## 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](https://docs.meshmap.com/unity-sdk/overview/example-projects), which have these settings preconfigured.

## Tools

<table><thead><tr><th width="359.800048828125">Class</th><th>Description</th></tr></thead><tbody><tr><td><a href="https://github.com/MeshMap/com.meshmap.sdk.xr/blob/main/Editor/Tools/AndroidGradlePatcher.cs"><code>AndroidGradlePatcher</code></a></td><td>Injects Gradle packagingOptions to resolve duplicate native libs during Android builds.</td></tr><tr><td><a href="https://github.com/MeshMap/com.meshmap.sdk.xr/blob/main/Editor/Tools/AndroidPluginFilter.cs"><code>AndroidPluginFilter</code></a></td><td>Disables platform-specific Android AARs when building for other targets to avoid native lib conflicts.</td></tr><tr><td><a href="https://github.com/MeshMap/com.meshmap.sdk.xr/blob/main/Editor/Tools/MeshMapManifestSwitcher.cs"><code>MeshMapManifestSwitcher</code></a></td><td>Automatically selects the correct AndroidManifest.xml template for the active target (<code>METAQUEST</code>, <code>MAGICLEAP</code>, <code>XREAL</code>) before Android builds.</td></tr><tr><td><a href="https://github.com/MeshMap/com.meshmap.sdk.xr/blob/main/Editor/MarkerTracking/MetaQuest/PassthroughCameraEditorUpdateManifest.cs"><code>PassthroughCameraEditorUpdateManifest</code></a></td><td>Ensures that Meta camera and passthrough feature permissions are enabled in the AndroidManifest.xml to use the <code>Passthrough Camera Access API</code>.</td></tr><tr><td><a href="https://github.com/MeshMap/com.meshmap.sdk.xr/blob/main/Editor/Tools/UPMWrapper.cs"><code>UPMWrapper</code></a></td><td>Automatically wraps XR device SDK files in scripting defines (e.g., <code>#if MAGICLEAP</code>) for multi-device Build Profile support. Runs when Unity compiles.</td></tr></tbody></table>
