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
- Fixing Message Loss in UMPE During Domain Reload
- The Editor freezes when ScheduleReadOnly of IJobParallelForTransform with dependency is used
- Text is truncated in the Inspector when the display scale is set to 150%
- CancellationTokenSource(<timeout>) has incorrect cancellation status when used in WebGL Player
- VFX property value names are cut off when properties with 'Arc' are viewed in the VFX Blackboard
Add comment