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.
Can you try the following steps and let me know if you still receive the error?
Close your project
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).
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.
@MatteoFifth
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.
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.
@mns
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.
@MatteoFifth
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.
@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.
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.
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)
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]
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.
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 3.5.0.20230410, 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 2.0.10.202305081358
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.