# App Sim/Unity - Stuck at "App Sim Ready"

**URL:** https://forum.magicleap.cloud/t/app-sim-unity-stuck-at-app-sim-ready/894
**Category:** Unity Development
**Tags:** ml-hub, unity, development, app-sim
**Created:** [September 18, 2022, 7:12pm UTC](https://forum.magicleap.cloud/t/app-sim-unity-stuck-at-app-sim-ready/894 "2022-09-18T19:12:59Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![owl](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/owl/32/330_2.png) [@owl](https://forum.magicleap.cloud/u/owl)
#### Post date: [September 18, 2022, 7:13pm UTC](https://forum.magicleap.cloud/t/app-sim-unity-stuck-at-app-sim-ready/894/1 "2022-09-18T19:13:00Z")

</div>

Hello!

I am currently setting up Unity for my Magic Leap 2 by following the instructions in the developer guide, and have reached Guides\>Unity\>GettingStarted\>Building a Simple App. I am trying to have a sample scene (with just the Magic Leap Main Camera prefab and a cube) show up on the headset through App Sim.

My issue is that when the App Sim is connected (as a Hybrid) and the Unity scene is played, the rotation of the Main Camera prefab and the Device View inside the Magic Leap Hub App Sim both work, but nothing displays on the Magic Leap 2 besides a message that says:

```auto
App Sim Ready
Play a scene in Unity or use ZILauncher to run an application on host.

```

When played, the Unity editor looks like:

 ![unity](https://us1.discourse-cdn.com/flex019/uploads/magicleap1/original/1X/945150ba1f4fff0573763898269d1cb7567e81bc.jpeg)  
The small "Main Camera" window that overlays the Scene View moves with the headset, but the display in the Game View does not move.

Starting an App Sim as just "Device" instead of "Hybrid" causes the rotation to not work, filling the terminal with:

 ![quaternions](https://us1.discourse-cdn.com/flex019/uploads/magicleap1/original/1X/60bdcc596d7d6429412e43e4696acf29757cd8f3.png)  
(Not an issue if I can get Hybrid working)

Building to the device as an APK allows me to run it and see the cube, but the App Sim does not.

**Unity Editor version** : 2022.2.0b7.2913  
**ML2 OS version** : B3E.220818.12-R.085 (Secure Devices Only)  
**ML App Sim (ZI) version**: 3.3.0.20220831  
**MLSDK version** : 0.53.3  
**Unity Version** : 2022.2.0b7.2913  
**Host OS** : Windows 11 (fresh reinstall)

**Error messages from logs** :  
The only warning I get is:

```auto
[MagicLeapXr-ImageTracking]: Could not start the image tracking subsystem because permissions were denied.
UnityEngine.XR.Management.XRGeneralSettings:AttemptInitializeXRSDKOnLoad () (at Library/PackageCache/com.unity.xr.management@4.2.0/Runtime/XRGeneralSettings.cs:148)

```

Maybe is there a permission that needs to be added to a manifest?

My installed packages are:

 ![packages](https://us1.discourse-cdn.com/flex019/uploads/magicleap1/original/1X/c2881e518f967db4ab6a67d965497c24af990a4d.png)  
Updating XR Plugin Management from 4.2.0 to 4.2.1 and updating Magic Leap XR Plugin from 7.0.0-exp.3 to 7.0.0-exp.4 both did not affect the issue.

Has anyone encountered this before or know what's going on?  
Thank you for your time!

---

<div class="post-metadata">

### Author: ![kvlasova](https://avatars.discourse-cdn.com/v4/letter/k/f6c823/32.png) [@kvlasova](https://forum.magicleap.cloud/u/kvlasova)
#### Post date: [September 19, 2022, 6:33pm UTC](https://forum.magicleap.cloud/t/app-sim-unity-stuck-at-app-sim-ready/894/2 "2022-09-19T18:33:14Z")

</div>

Thank you for your first forum post!  
Can you provide the logs from App Sim when this error occurs? You can get the logs by going to **App Sim \> Save Diagnostics Logs** in the upper left menu of the App Sim window.

---

<div class="post-metadata">

### Author: ![owl](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/owl/32/330_2.png) [@owl](https://forum.magicleap.cloud/u/owl)
#### Post date: [September 20, 2022, 1:24am UTC](https://forum.magicleap.cloud/t/app-sim-unity-stuck-at-app-sim-ready/894/3 "2022-09-20T01:24:46Z")

</div>

Hi Kat! Thank you for the response, here's the logs:

[MLHubLogs-20220919-181510-win.zip](https://forum.magicleap.cloud/uploads/short-url/ekWdmVnca1F1CPmYWQH8TyYWZVp.zip) (241.1 KB)

I noticed unity/Editor-prev.log contains a lot of the following errors  
`Error on graphics thread: 1`  
`[XR] [ML] Error in ZI API`  
`[XR] [XR::Display] Failed to create graphics client`  
`Invalid worldAABB. Object is too large or too far away from the origin.`  
`Input quaternion was not normalized`

Here's everything I did to try and solve this Vulkan error in logs \> zi \> logfile.txt (no success unfortunately) since it seems the most relevant:

```auto
045524.014 <ml_hub.exe:3692~69f4> E [VulkanRenderDevice.cpp:111] Missing required extensions
045524.016 <ml_hub.exe:3692~69f0> E [VulkanRenderDevice.cpp:281] Failed to call vkEnumerateInstanceExtensionProperties fffffffd

```

- reinstalled NVidia drivers
- reinstalled the Vulkan SDK (manually ran as administrator)
- downloaded NVidia's Vulkan ICD
- set VulkanConfigurator to defaults

---

<div class="post-metadata">

### Author: ![owl](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/owl/32/330_2.png) [@owl](https://forum.magicleap.cloud/u/owl)
#### Post date: [September 22, 2022, 4:03pm UTC](https://forum.magicleap.cloud/t/app-sim-unity-stuck-at-app-sim-ready/894/4 "2022-09-22T16:03:00Z")

</div>

Hi Kat,

Bumping this since it's been a few days, any chance for anyone to take a look yet?  
Thank you for your time!

Cheers,  
Adam

---

<div class="post-metadata">

### Author: ![kvlasova](https://avatars.discourse-cdn.com/v4/letter/k/f6c823/32.png) [@kvlasova](https://forum.magicleap.cloud/u/kvlasova)
#### Post date: [September 22, 2022, 4:35pm UTC](https://forum.magicleap.cloud/t/app-sim-unity-stuck-at-app-sim-ready/894/5 "2022-09-22T16:35:23Z")

</div>

Hi @owl,  
Working on troubleshooting this now. Just to confirm, did you follow all the steps listed in the [Using App Simulator with Unity](https://developer-docs.magicleap.cloud/docs/guides/developer-tools/ml-hub/app-sim/app-sim-unity) guide and enabled Magic Leap Zero Iteration in the [Standalone XR Plugin Management](https://developer-docs.magicleap.cloud/docs/guides/unity/getting-started/configure-unity-settings#xr-plugin-management) provider window?

---

<div class="post-metadata">

### Author: ![owl](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/owl/32/330_2.png) [@owl](https://forum.magicleap.cloud/u/owl)
#### Post date: [September 22, 2022, 5:32pm UTC](https://forum.magicleap.cloud/t/app-sim-unity-stuck-at-app-sim-ready/894/6 "2022-09-22T17:32:02Z")

</div>

Hi Kat,

Thank you! Yes, just double-checked everything. The App Simulator and Unity seem to be connected, since the camera inside Unity is rotating with the headset, it's just not drawing anything to the lens. 😕

Is there maybe something that needs to be added to the manifest for the `[MagicLeapXr-ImageTracking]: Could not start the image tracking subsystem because permissions were denied. UnityEngine.XR.Management.XRGeneralSettings:AttemptInitializeXRSDKOnLoad () (at Library/PackageCache/com.unity.xr.management@4.2.1/Runtime/XRGeneralSettings.cs:148)` error in Unity? I tried enabling all of the manifest boxes.

-Adam

---

<div class="post-metadata">

### Author: ![kvlasova](https://avatars.discourse-cdn.com/v4/letter/k/f6c823/32.png) [@kvlasova](https://forum.magicleap.cloud/u/kvlasova)
#### Post date: [September 23, 2022, 4:06pm UTC](https://forum.magicleap.cloud/t/app-sim-unity-stuck-at-app-sim-ready/894/7 "2022-09-23T16:06:09Z")

</div>

Hi @owl,

It looks like you are trying to run image tracking on the device via App Sim, which is not supported in Device mode as referenced in our [App Sim Key API matrix](https://developer-docs.magicleap.cloud/docs/guides/developer-tools/ml-hub/app-sim/app-sim-key-api-features). Can you try running an alternative example scene that doesn't contain any image tracking references in it?

---

<div class="post-metadata">

### Author: ![kbabilinski](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/kbabilinski/32/19_2.png) [@kbabilinski](https://forum.magicleap.cloud/u/kbabilinski)
#### Post date: [September 23, 2022, 9:57pm UTC](https://forum.magicleap.cloud/t/app-sim-unity-stuck-at-app-sim-ready/894/8 "2022-09-23T21:57:48Z")

</div>

Note, hybrid mode only displays the graphics inside the App Simulator's Device View and not inside the actual headset.

---

<div class="post-metadata">

### Author: ![kbabilinski](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/kbabilinski/32/19_2.png) [@kbabilinski](https://forum.magicleap.cloud/u/kbabilinski)
#### Post date: [September 23, 2022, 9:59pm UTC](https://forum.magicleap.cloud/t/app-sim-unity-stuck-at-app-sim-ready/894/9 "2022-09-23T21:59:26Z")

</div>

Can you try using the XR Rig prefab instead of the ML Camera? It is located under `Packages/Magic Leap SDK / Runtime / Tools/ Prefabs `
