# Magic Leap 2

These screenshots show the Unity 6 and device settings required to successfully deploy and launch apps on the Magic Leap 2.

## Settings & Permissions in Unity

#### 1. Build Profiles > Android > ML2 Profile > Scene List & Scripting Defines

Ensure that you have a Build Profile targeting Magic Leap with the correct scene list and scripting defines.

<figure><img src="/files/1pbXpMRYsjxhF68sM4gC" alt=""><figcaption></figcaption></figure>

#### 2. Build Profiles > Android > ML2 Profile > Other Settings

Make sure the Vulkan Graphics API, DXTC texture compression format, package name, version, IL2CPP scripting backend, new input system, x86-64 target architecture, internal write permission, and application entry point are set correctly.

<figure><img src="/files/lgHpGoB1lan5YFo1KxHX" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/EgWhMXWMmLT0mK287bfn" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/Fg9HJwnnmkaEfjZB8MJh" alt=""><figcaption></figcaption></figure>

#### 3. Build Profiles > Android > ML2 Profile > Publishing Settings&#x20;

Make sure the custom main manifest, custom main Gradle template, and custom launcher Gradle template are all correctly assigned.

<figure><img src="/files/M4Mfyq3bn2icjSdg9Lmf" alt=""><figcaption></figcaption></figure>

#### 4. Project Settings > XR Plug-in Management

Enable the OpenXR Plugin and Magic Leap 2 feature group.

<figure><img src="/files/Z8yf6vpAANSfLZ5T61q2" alt=""><figcaption></figcaption></figure>

#### 5. Project Settings > XR Plug-in Management > OpenXR > Enabled Interaction Profiles & Feature Groups

Check that any required interaction profiles, feature groups, and subsystems used in your project are enabled.

<figure><img src="/files/UqSaYTFWvkeA1tRycBtt" alt=""><figcaption></figcaption></figure>

#### 6. Project Settings > XR Plug-in Management > Project Validation

Review that all checks pass successfully.

<figure><img src="/files/JbciffepWvs1vaSCX0SI" alt=""><figcaption></figcaption></figure>

#### 7. Project Settings > MagicLeap > Permissions

Include all Android permissions that you anticipate your app needing. Additional permissions may be required on the device, in the app permission settings.

<figure><img src="/files/lzOqQR4p6R4j3OZco9k0" alt=""><figcaption></figcaption></figure>

## Installing an App to Magic Leap 2

1. To install an .apk to your device, enable [Developer Mode](https://developer-docs.magicleap.cloud/docs/guides/getting-started/enable-developer-mode/) and [USB Debug Mode](https://developer-docs.magicleap.cloud/docs/guides/getting-started/enable-developer-mode/#enable-usb-debug-mode).
2. Connect your Magic Leap 2 to your computer via USB-C cable.
   1. If your computer has a USB-A port, you may need to use a USB-A-to-C cable.
3. Enable "Allow USB debugging" if prompted.
   1. Check "Always allow from this computer" to not receive this popup in the future.
4. Use [Magic Leap Hub 3](https://developer-docs.magicleap.cloud/docs/guides/developer-tools/ml-hub-3/get-started/) to install the app. Go to Device Bridge > Apps > Install App, and select your .apk file.&#x20;

## Settings & Permissions on Device

For each app you download, you may have to manually grant permissions (e.g., camera, voice input) on device in `Settings > Apps & Notifications > App info > your-app > Permissions`.


---

# 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/magic-leap-2.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.
