# 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](/unity-sdk/overview/example-projects.md) and carefully following the instructions for each device ([Magic Leap 2](/unity-sdk/xr/cross-platform-management/magic-leap-2.md), [Meta Quest 3](/unity-sdk/xr/cross-platform-management/meta-quest-3.md), and [XREAL Air 2 Ultra](/unity-sdk/xr/cross-platform-management/xreal-air-2-ultra.md)) 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](/unity-sdk/overview/example-projects.md), 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>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.meshmap.com/unity-sdk/xr/cross-platform-management.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
