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
- Mono Windows Builds don't produce full log callstacks when generating logs
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
Add comment