- Home /
Problem with Unity's auto-upgrade system for shaders
We upgraded to 5.4, but for some reason, Unity has become extremely invasive with it's API auto-upgrade policy. We definitely did the C# script upgrades, without much issue, but there are lines in our shaders that we do not want to be modified. They are specifically surrounded in #if UNITY_VERSION... blocks, so that the shaders work with multiple versions of Unity. But the upgrader, just auto-changes all the lines in those blocks. I've tried multiple times to revert, but it just keeps modifying the files, without any warnings to me.
Is there a way to circumvent this or disable auto-upgrading of shaders? This seems very broken.
Answer by JakeTurner · Oct 18, 2016 at 09:15 AM
From the 5.4 release notes:
Shaders: Added ability to exclude shaders from automatic upgrade by having "UNITY_SHADER_NO_UPGRADE" anywhere in shader source file.
Your answer
Follow this Question
Related Questions
PlayableDirector Events (paused,played,stopped) not showing on code 0 Answers
Can't Jump and CursorLockMode.Locked Unity 2019.4LTS Linux 1 Answer
Unity 5 API Updater Keeps Failing 4 Answers
Unity does not support have the `ObservableCollection` class? 1 Answer
c# 6 not recognize after project upgrade from 2017 to 2019 version. 0 Answers