I have been trying to successfully use the App Sim with Unity and I am struggling. Currently, I am able to start up the sim in Hybrid mode and then successfully connect a session in Unity. If I try Device mode it usually crashes.
Crashing aside when I do connect to a session in Unity without any warnings I can see the main camera in the XR Rig moving in the Scene View but if I then switch back to Game View the camera doesn't move. If I have both windows open the camera doesn't move either, input only seems to work when the scene view is the only active window. Am I doing something wrong, or missing something thanks?
**Unity Editor version 2022.2.05b:
**ML2 OS version 221020.13-R.039:
**MLSDK version 1.1.0:
Host OS: (Windows)
Hi @stuart_spencer, Thank you for your post. I'll look into this now and follow up shortly.
Something I have noted is I have set the ADB path in the ML Hub settings to the same path as Unity Android SDK bundle included with Unity (which it prefers), yet when I press play in Unity the Console logs the following:
[ZIF] Using adb in C:\ANDROID\platform-tools/adb.exe
I also have Android Studio installed and this might be set as the ADB on the environment system path. It's as though something is overriding the ML Hub settings specified. These are:
To confirm from my previous message, C:\ANDROID\platform-tools/adb.exe is not added to the environment system path on my machine.
@stuart_spencer, what version of the Magic Leap Hub and App Sim, etc. are you using? You can save diagnostic logs directly from Unity, i.e.,
Magic Leap > Save Diagostic Logs... which has this info. Thank you.
I'm using the latest version via the package manager. Logs DL
I followed the Console adb path message to the file that finds the AndroidSDK path and noticed it wasn't finding the SDK unity is using if that is of help, I then hardcoded the file path into the path field, which works on play but I still do not get any Game View camera movement. It appears in logs lots of important things are failing maybe. Thanks you for your assistance.
Got it thank you, I'll follow up shortly.
Looks like there's no device logs there, perhaps the device was turned off before the logs were captured. Can you please try with the device on? Also, please let us know which mode you're trying to run.
Our engineers suggested running Simulator mode first, before attempting Device or Hybrid, and check if you can get that to work first.
Thank you, hope this helps.