Search Issue Tracker
By Design
Votes
0
Found in
2019.4
2020.3
2020.3.21f1
2021.2
2022.1
2022.2
Issue ID
1388288
Regression
No
[Win10] Graphics.DrawProceduralNow from OnRenderObject breaks when Worldspace Canvas is in Camera's view
How to reproduce:
1. Open the user's attached project "PC_URP_2020_3.zip"
2. In the Project window's Searchbox search for "PointCloud-BinaryLoaderV2.unity" and open it
3. Press Play
Expected result: Graphics.DrawProceduralNow() drawing is drawn outside of the Canvas GameObject
Actual result: Graphics.DrawProceduralNow() drawing is drawn inside of the Canvas GameObject
Reproducible with: 2019.4.34f1, 2020.3.25f1, 2021.2.7f1, 2022.1.0b3, 2022.2.0a2
Notes:
- In the Hierarchy window disabling "Canvas" > "Panel-TURN-THIS-OFF" or moving it outside of the Camera's view Graphics.DrawProceduralNow() draws outside of the Canvas GameObject
- Creating a new Universal RP project and importing the user's project Assets folder makes the drawing correctly displayed
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
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
Resolution Note (2022.2.X):
The procedural geometry is being rendered after the UI panel so it is using the UI panel's transform, which is by design. The docs for https://docs.unity3d.com/2019.1/Documentation/ScriptReference/Graphics.DrawProceduralNow.html explain "Note that this call executes immediately, similar to Graphics.DrawMeshNow. It uses the currently set render target, transformation matrices and shader pass".
https://docs.unity3d.com/ScriptReference/Graphics.DrawProcedural.html or https://docs.unity3d.com/ScriptReference/Rendering.CommandBuffer.DrawProcedural.html may be more suitable for this use case.