Hello,
Have you considered wrapping each C# script in the ML2 OpenXR Unity SDK with the scripting define #if MAGICLEAP #endif so that it is easily compatible with Unity 6 build profiles?
I am creating some Unity 6 projects that support multiple XR HMDs (e.g., ML2, XREAL A2U). I have each device-specific Unity SDK imported and set up a build profile for each so that the architecture (e.g., x86_64), graphics API (e.g., Vulkan), texture compression (e.g., DXTC), and other settings are properly configured.
However, the ML2 SDK always tries to compile and add its own features to my .apk build even when I’m using a different profile. For context, I originally noticed this problem because the XREAL Unity SDK v3.0.0 forcefully configures a native android app launcher even when building an app for ML2. So this issue is not unique to the ML2 SDK.
I wrote my own Editor script that wraps each class in each SDK with their respective scripting defines (MAGICLEAP, XREAL), but I need to rerun it each time the Package Manager reimports.
It would be great if the ML2 dev team could please wrap their classes with the MAGICLEAP define, or suggest another solution to support Unity 6 build profiles. I’ve only been working in Unity for ~2 years, so I may be overlooking something basic due to inexperience.
Thank you very much, and all the best.
*Edited: It would be good to also apply this to the Magic Leap Setup Tool.
Unity Editor version: 6000.0.50f1
ML2 OS version: latest
Unity SDK version: 2.6.0-pre.R15
Host OS: both