Automatic API Updater force updating shader code that's in an ifdef
I have a shader that is being automatically updated when going from 5.5 to 5.6
#ifdef UNITY_VERSION >= 560
o.vertex = UnityObjectToClipPos(v.vertex);
#else
o.vertex = mul(UNITY_MATRIX_MVP, v.vertex);
#endif
I would expect the Auto API updater would not change the above code but after updating to 5.6 it is changing the code in the else to the code in 5.6
This doesn't happen when using ifdefs in standard c# code but in the shader it's changing the code.
Am I doing something wrong, is this a bug or is this expected behavior?
Answer by Sysdia · Apr 07, 2017 at 08:08 AM
Found the answer here:
http://answers.unity3d.com/questions/1248427/is-it-possible-to-disable-the-automatic-shader-var.html
Your answer
![](https://koobas.hobune.stream/wayback/20220612114842im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Just updated to newest Unity version but something's missing 0 Answers
how to update unity game API level to 26 0 Answers
Game works fine inside editor but takes forever to load after build. 0 Answers
IOS Vuforia Shader Issue 0 Answers
Standar Shader Transparent with no alpha remain transparent? 0 Answers