Demigiant / dotween

A Unity C# animation engine. HOTween v2
http://dotween.demigiant.com
Other
2.34k stars 351 forks source link

DOTweenModuleUI.cs is not working with Unity 2021.2.12f1 #600

Closed XynanXDB closed 2 years ago

XynanXDB commented 2 years ago

image

As the image above shows the script is been ignored by the preprocessors above. All scripts that have the similar preprocessors are ignored.

Demigiant commented 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).

XynanXDB commented 2 years ago

@Demigiant I upgraded to 2021.3.11f1, the problem still persist though.

Demigiant commented 2 years ago

That is extremely weird :O I have it open here and correctly getting the defines:

image

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?

XynanXDB commented 2 years ago

Just now I go far to use 2022.1.18f1, the problem still exist

XynanXDB commented 2 years ago

Hmmm, I see that you are using Rider, currently I'm using VS Community. I don't know if this will do anything though.

XynanXDB commented 2 years ago

Using #if true && UNITY_2021_1_OR_NEWER // MODULE_MARKER doesn't work either.

XynanXDB commented 2 years ago

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.

Demigiant commented 2 years ago

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