Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect Brotli handling for AndroidMono #187

Closed
vadim-marchuk opened this issue Mar 22, 2024 · 1 comment
Closed

Incorrect Brotli handling for AndroidMono #187

vadim-marchuk opened this issue Mar 22, 2024 · 1 comment

Comments

@vadim-marchuk
Copy link

Hi there. I have encountered the same issue as described here. While the workaround mentioned there works, I also noticed the preprocessor directives responsible for not using Brotli on Android Mono look incorrect. Can you please look at the arguments below and give your thoughts? Thank you!

#if (NET_STANDARD_2_1 || UNITY_2021_2_OR_NEWER) && (!(ENABLE_MONO && UNITY_ANDROID) || (!UNITY_WEBGL || UNITY_EDITOR))

The second part of this can be rewritten in the next format.
!(ENABLE_MONO && UNITY_ANDROID) || !UNITY_WEBGL || UNITY_EDITOR

And on the Android Mono build, this expression will give
false || true || false = true
while the expected result is false.

If Brotli is allowed in UnityEditor and on any platform except WebGL and MonoAndroid, then the expression should be
UNITY_EDITOR || (!UNITY_WEBGL && !(ENABLE_MONO && UNITY_ANDROID))

@Benedicht
Copy link
Owner

Thanks for creating a new issue. Something definately off in that define, recently received an email too about it, but had no time yet to investigate.

Your version looks correct, it will be included in the next version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants