Empty Game window during app simulation

Unity Editor version: 2022.2.0b8
MLSDK version: 1.0.0
Magic Leap Application Simulator (ZI) Runtime version: v3.3.0.20220921
Magic Leap App Simulator for Unity (if applicable): 1.0.0
Host OS: Windows

Hi, I'm trying to set up a test project. I'm having trouble with the app simulation setup. I'm trying to use the Magic Leap App Simulator for Unity plugin to emulate the device. If I try to launch an app sim session through the dedicated window I get an error that says to set the OpenGL Core graphic API.

After the fix, I'm able to run an app sim simulation and the input given through the controller window, the app sim head pose window, and the game window is responsive. However, everything in the game window disappears when I hit the play button. I can correctly see the scene content through the scene window and the little camera preview. Moreover, the input is responsive, but I can't see anything in the game window. I think the problem is related to the GLSL error, but I cannot find a fix.

1 Like

Hi @MatteoFifth ,

Can you try the following steps and let me know if you still receive the error?

  1. Close your project
  2. Head into your Unity project folder and delete the Library folder. Then restart the project in the Unity editor (This will prompt the Library folder to be rebuilt).
  3. Make sure you've completed all the proper project configuration steps
  4. If this error persists, please attach the App Simulator logs which you can find by going to Magic Leap > Save Diagnostics Logs in the upper Unity Editor menu.
1 Like

Hi @MatteoFifth, any luck with the steps above? Thanks.

Hi @kdowney,
Unfortunately, the GLSL compilation errors are still present. I tried to export the Diagnostic file, but I got this error in console.

1 Like

Hi, I faced the same issue probably.
Have you already solved this? If yes, could you please teach me how to solve it?
Or can you provide some tips as far as you remember?
I really appreciate any help you can provide.

1 Like

@kdowney @kvlasova

I followed the instruction but still had the same error.
I succeeded in getting the Logs file by doing Magic Leap > Save Diagnostics Logs. But its size is over 30 MB then, so I can not attach it to this thread.
Which file is actually needed for your investigation? Thanks in advance.


1 Like

Unfortunately, I wasn't able to fix these errors and use ML sum services. In my company, we integrate MRTK into our projects, so to test the applications now, I use the simulation services offered by Microsoft in the mixed reality toolkit. The counter to this approach is that you cannot test features that are specific to ML2, like the controller.

1 Like

Thank you very much for your quick answer.
It is so sad not to be able to fix it.
But using the simulation service in MRTK sounds suitable for my case too. I'll do that. Thanks again.


Hi @MatteoFifth, thank you for your patience. We previously had a bug preventing the successful export of the error log. If you are able to update to our latest builds in Magic Leap Hub, and still have the issue, you should be able to export the log now without a problem. We'll take a look as a priority.

1 Like

@kdowney Hi, I updated the unity SDK and ML app sim. Now if I try to enter play mode the behaviour is the same as described in the main question of this post, but after the GLSL errors, I get a loop of new errors. This is a screenshot of the unity console.

By the way, now I'm able to extract the logs and I'm providing them to you hoping to find a solution.
Thanks a lot for the help.

MLHubLogs-20221213101840.zip (2.5 MB)

1 Like

Thank you for your logs @MatteoFifth. The likely cause of this is the shaders require DirectX or Vulkan and need to be adapted for OpenGL. Please let me know if this unblocks you.

1 Like

Hi all, if your Unity Editor's Game view goes blank after starting the App Simulator, please try the following:

  • Open your project's Player Setting
    • Open the Standalone tab (ie looks like a monitor and says Setting for Windows, Mac, Linux)
    • Expand Other Settings and under Rendering
      • uncheck – Auto Graphics API for Windows
      • uncheck – Auto Graphics API for Mac
      • Then in Graphics APIs for Windows
        • Add OpenGLCore
        • Delete Direct3D11 – It should restart.
      • Then in Graphics APIs for Mac
        • Add Metal
    • Finally, seleect Resolution and Presentation > Resolution > "Run In Background."

Regarding the Hand Input device error, Can you verify that you have the Hand Tracking permission enabled ( Project Settings , then in the left hand menu MagicLeap>Permissions)

1 Like

I also have this problem, black screen on the unity editor and the glasses don't show anything. I tried everything suggested here but no luck. It even happens when it's simulator only.

It works correctly if I try it on the unity samples app

I'm attaching the logs, I took a look myself and notice that this message gets spammed

142136.751 Unity.exe:42104~57e8 E [ProtoUtils_graphics.cpp:90] Incoming version 0 is not supported
142136.752 Unity.exe:42104~57e8 'ml::SdkShim::CheckStructVersion' E [VersionCheck.inl:91] invalid MLGraphicsFrameParamsEx version 0, supported range is [2 ... 5]

MLHubLogs-20230511-151413-win.zip (2.9 MB)

Can you let us know the OS, Unity Editor and Unity SDK you are using?

The unity package is 1.6, ml sdk is 1.2 and so is the OS. Unity version 2022.2.19

I can also tell you that the screen is black the first run, the second run unity just crashes, i tried on two different computers and it's the same problem. Also, sometimes it throws some math errors like
Assertion failed on expression: 'fRoot >= Vector3f::epsilon'
UnityEngine.Quaternion:LookRotation (UnityEngine.Vector3)

@javier can you confirm that this happens in App Sim inside ML Hub and could you try running the Application Simulator for Unity package inside Unity and see if this error persists with that package as well?

Alternatively we recommend re-installing the Application Simulator package in ML Hub to see if the issue persists.

@kvlasova Yes actually I tried the app sim for Unity and the same problem occurred.

But like I said before, it all works on the Unity samples app

Javier, can you please update your ML Hub and App Sim packages to the latest version (both the runtime package inside ML Hub and the App Sim for Unity package) and try it again? It looks like the errors are coming from package versions being mismatched.

The app sim runtime version seems to be the latest, it's, I don't use the Unity app sim, I tried it once and since it didn't work so i removed it.

The ML hub is updated too, version

I'd imagine is some kind of misconfiguration on my project, like I was saying before, it all works perfectly fine when I run the Unity samples that ML provides.