Search Issue Tracker
By Design
Votes
0
Found in
5.6.0f3
Issue ID
912767
Regression
No
multi_compile ignores Preprocessor directives
To reproduce:
1. Download and open "rotate-test.zip" project.
2. Select "NewUnlitShader" in Assets folder.
3. In the inspector click "Compile and show code" button.
4. In the compiled code notice lines with "Keywords set in this variant" words.
Expected result: Only one multi_compile statement is executed and it outputs:
Keywords set in this variant: A
Keywords set in this variant: B
Actual result: Both multi_compile statements in "NewUnlitShader" shader are executed resulting in wrong results:
Keywords set in this variant: A C
Keywords set in this variant: A D
Keywords set in this variant: B D
Reproduced with: 2017.1.0b6, 5.6.1p1, 5.5.3p2, 5.4.5p1
Notes: multi_compile is surrounded by if/else statement, one multi_compile being in if clause and other multi_compile in else close. Thus both are executed, even thought if/else should limit only one these statements to be executed.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Progress indicator in Meta Quest Build Profile configuration is barely visible
- Slightly transparent objects disappear completely in Web Player when using RenderGraph
- Visual Scripting Components are hidden behind a throbber when Multiplayer Play Mode is running with at least one local instance
- Video Player does not throw an error when playing a video with unsupported encoding settings
- Errors indicating that TMP Extras were not Imported logged when opening the Render Pipeline Converter Window while in Play Mode
Add comment