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
- ACES Tonemapping causes banding artifacts and negative values in ColorGradingLUT when HDR is enabled and "High Dynamic Range" Grading mode is selected while Android Platform is used
- Android Player freezes when an Audio Source is playing and an incoming call is picked up and then hung up and the Audio Source is started again
- Green success icon is poorly visible in the light Unity theme
- Incorrect input into the Input Field when using Microsoft IME Japanese
- Multiplayer role "ClientAndServer" is displayed without the spaces in the "Play Mode Scenarios" window
Add comment