Closed XynanXDB closed 2 years ago
Ahoy! That seems like a specific bug with Unity 2021.2.12, where Unity forgot to include the "2017_OR_NEWER" define. I'm on 2021.3.11 and I can confirm it's fixed and working there (probably they already fixed it in 2021.2.13 but I can't find it in their release notes).
@Demigiant I upgraded to 2021.3.11f1, the problem still persist though.
That is extremely weird :O I have it open here and correctly getting the defines:
Could you try replacing line 4 with
#if true && UNITY_2021_1_OR_NEWER // MODULE_MARKER
to see if for some reason your Unity is not reading any defines?
Just now I go far to use 2022.1.18f1, the problem still exist
Hmmm, I see that you are using Rider, currently I'm using VS Community. I don't know if this will do anything though.
Using #if true && UNITY_2021_1_OR_NEWER // MODULE_MARKER
doesn't work either.
It's alright I have solved it, I realized my config is set to Release rather than Debug, I flipped it back to Debug then it works already. Thanks for your time.
Oh damn, I hadn't thought of it. Unity always builds in Debug mode, but I would've expected the defines to work in all modes
As the image above shows the script is been ignored by the preprocessors above. All scripts that have the similar preprocessors are ignored.