Search Issue Tracker
By Design
By Design in 2023.3.X
Votes
0
Found in
2021.3.25f1
2022.2.20f1
2023.1.0b16
2023.2.0a15
2023.3.0a3
Issue ID
UUM-35886
Regression
No
CommandBuffer.DrawRenderer fails to render GameObjects after building the project
Reproduction steps:
1. Open the attached “CustomTesting0.zip“ project
2. Open the “MainCustomPassTestingScene0” scene
3. Build the project
4. Observe the Game window
Expected result: GameObjects are rendered
Actual result: GameObjects are not rendered
Reproducible with: 12.1.11 (2021.3.25f1), 14.0.7 (2022.2.20f1), 15.0.5 (2023.1.0b16), 16.0.1 (2023.2.0a15)
Could not test with: 10.10.1 (2020.3.48f1) (Errors in the Console)
Reproduced on: macOS Monterey 12.6 (Intel), Windows 11 (by the reporter)
Notes:
- Also reproducible in Build
- Could not test with HDRP (Errors in the Console)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Assets are created in the Package folders when creating assets via custom buttons in the Inspector window or other windows
- “Select” windows are named differently on Windows and macOS
- [Windows] No minimum “Select” window size
- Enabling “Editor Extension Authoring” in UI Builder doesn’t dirty the document and saving with shortcut doesn’t persist the state
- WebRequest.Create() function fails with "URI prefix is not recognized" errors when the project is built for Linux Standalone or Windows Dedicated Server
Resolution Note:
We looked into this issue. Indeed the CommandBuffer.DrawRenderer API will not draw objects that are not part of the culling mask from the camera.
The way you can approach what you are trying to do in URP is to set the culling mask of the camera to include the custom layers (Closest, Mid, Farthest) and in the URP renderer you filter those layers so they are not drawn in the opaque, gbuffer and transparent passes. In order to filter you can go to the Renderer asset and under the option Filtering you remove the layers (Closest, Mid, Farthest) from both opaque and transparent.
Resolution Note (2023.3.X):
We looked into this issue. Indeed the CommandBuffer.DrawRenderer API will not draw objects that are not part of the culling mask from the camera.
The way you can approach what you are trying to do in URP is to set the culling mask of the camera to include the custom layers (Closest, Mid, Farthest) and in the URP renderer you filter those layers so they are not drawn in the opaque, gbuffer and transparent passes. In order to filter you can go to the Renderer asset and under the option Filtering you remove the layers (Closest, Mid, Farthest) from both opaque and transparent.