Cancelling this 2023.2 tech release issue since the support for this release has come to end of life. Cancelling this 2023.2 port case does not affect any LTS or Unity 6 Beta/Preview that remain open.
2021.3 is too close to end of support to backport even small changes.
How to reproduce:
1. Open the “MultiCompileFragmentVariants” project
2. Select the “UnlitMultiCompileFragmentMultiLines” shader in Project
3. In the Inspector select “Compile and show code” then observe the lines of code
4. Select the arrow next to the “Compile and show code” button
5. Observe the Inspector
Expected result: The Inspector shows that it generates more than one vertex shader variant and more than one fragment shader variant
Actual result: The Inspector does not show that it generates more than one vertex shader variant and more than one fragment shader variant