Search Issue Tracker
Fixed
Fixed in 2021.3.38f1, 2022.3.25f1, 2023.2.18f1, 6000.0.0b15
Votes
0
Found in
2021.3.35f1
2022.3.19f1
2023.2.9f1
2023.3.0b6
6000.0.0b11
6000.0.37f1
Issue ID
UUM-62756
Regression
No
#pragma directives in .hlsl files are not being ignored when #include is used
How to reproduce:
1. Open the attached “PragmaBug.zip“ project
2. Open the “Assets/Scenes/ExampleScene.unity“ Scene
3. Observe the Game view
Expected result: The “RedColorSphere“ GameObject is red
Actual result: The “RedColorSphere“ GameObject is blue
Reproducible with: 2021.3.35f1, 2022.3.19f1, 2023.2.9f1, 2023.3.0b6
Reproducible on: macOS 14.2.1 Sonoma (Intel)
Not reproducible on: No other environment tested
Notes:
- Also reproducible in Player
- Warnings that indicate that the Pragmas will be ignored are shown in the Inspector when the “Assets/Shaders/CustomShader.shader“ shader is selected
- The documentation ([https://docs.unity3d.com/2022.3/Documentation/Manual/SL-PragmaDirectives.html|https://docs.unity3d.com/2022.3/Documentation/Manual/SL-PragmaDirectives.html|smart-link] ) is very explicit that Unity-specific #pragma directives in .hlsl files will be ignored unless the #include_with_pragmas directive is used
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Color picker does not show the correct color when selecting color on the moving object
- “Asset X has no meta file, but it's in an immutable folder. The asset will be ignored.” errors are thrown when importing package with files not listed in package.json's "files" property
- There is no way to adjust the HDR Paper White value of the Unity Editor's interface, making it difficult/uncomfortable for some developers to work on very dark/bright scenes in HDR
- Animator window has a dropdown button that throws “MissingReferenceException” error on a new project when the previous project had a GameObject with an animation
- Animator State name overflows outside the visual box when the State has a long name
Add comment