Conditional compilation?

Our codebase relies heavily on conditional compilation to load needed assets into our scenes, and it does not seem that UNITY_MAGICLEAP (and PLATFORM_LUMIN) works anymore?
Any workaround to this, or am I not set up properly in Unity ( I wouldn't be surprised, but seeing I can do ZIF... :slight_smile: )

2 Likes

@boris.blosse currently there is no way to check at compile time if it's for a Magic Leap device or other Android device. As of now, the proper way to detect is at runtime, you query whether or not the Magic Leap XR provider is enabled and active. You can also use SystemInfo.deviceName if that's easier.

1 Like

Thanks @cdorff . You're saying "currently" are there plans in the roadmap to bring back a conditional for ml?
Edit: I'll use a custom scripting define instead :slight_smile:

1 Like

It's something that's definitely come up multiple times, but an official solution isn't on the current timeline. A custom define is probably a good option.

1 Like