Search Issue Tracker
By Design
Votes
0
Found in
5.0.0f2
Issue ID
673327
Regression
No
Shader preprocessor ignores Unity platform defines
How to reproduce:
1. Open new project
2. Import attached shader into project
3. Place two planes one above another
4. Create a material using the imported shader
- The shader appears to be a simple distance-based blur
5. Open the shader
6. Go to line 78
7. Adjust the code under the #else statement to produce slightly different results (for example, change 0.5 to 0.6) and save the shader
8. Return to the Editor and observe the changes
9. Build to OSX/Win standalone and run
- Notice how the #elif statements were ignored and the shader produces the same result in standalone as in the editor
- The the #if and #elif statements appear to work fine, as simply using 1 or 0 produces expected results.
- The platform defines match the ones in http://docs.unity3d.com/Manual/PlatformDependentCompilation.html
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Mouse cursor does not revert to the default mouse cursor when pressing the "Add column" button in the Search window
- ArgumentException is thrown and textures become unreadable when AssetBundle.Unload(false) is called
- URP Tab Reset Menu Button Is Invisible in Light Mode
- Editor crashes on "(Unity) WriteObjectToVector" when entering into the Play Mode
- Saved search to project properties have no margin at the top of the Inspector window
Add comment