NullReferenceException in Magic Leap App Sim: Object reference not set to an instance of an object

Dear Magic Leap Developer Community,

I hope this message finds you well. I wanted to bring to your attention an issue I encountered while using the Magic Leap App Sim simulation library in Unity.

  • Unity Editor version: 2022.2.0b16
  • ML2 OS version: Version 1.2.0, Build B3E.230330.11-R.044
  • MLSDK version: v1.6.1
  • Host OS: Windows 11

Error messages from logs: I am receiving a NullReferenceException with the error message "Object reference not set to an instance of an object" while using the Magic Leap App Sim in Unity. This exception occurs in the AppSimShimLibSupport class at line 48.

I have made sure to install the latest version of the Magic Leap Unity SDK, and the Magic Leap App Sim is properly configured. However, I am still experiencing this issue.

I have reviewed my code, dependencies, and object initialization, but I have been unable to identify the exact cause of the problem. I have also temporarily disabled other plugins or assets to check for conflicts, but the issue persists.

I would greatly appreciate any guidance or insights from the community to help resolve this issue. If any additional information or code snippets are needed for further investigation, please let me know, and I'll be glad to provide them.

Thank you in advance for your assistance and support in addressing this matter.

Best regards,

Muhammad Usman Bashir

HI @usman.bashir - I see that you are using a very old version of the Unity editor in this project. Can you please upgrade to the latest Unity 2022.2.xfx version (currently 2022.2.20f1 ) and see if this error persists?

I have resolved this issue by updating unity and some packages.