Search Issue Tracker
By Design
By Design in 2023.1.X
Votes
0
Found in
2020.3.37f1
2021.3.7f1
2022.1.11f1
2022.2.0b3
2023.1.0a4
Issue ID
UUM-10250
Regression
No
Canvas visibility is inconsistent depending on the Camera's Clipping Plane Far or Near values when the Canvas.planeDistance is set to Camera.farClipPlane or Camera.nearClipPlane
Reproduction steps:
- Open the attached project
- Open the “/Assets/Scenes/SampleScene.unity“ Scene
- Enter the Play Mode
- Select the “Main Camera” GameObject in the Hierarchy window
- Adjust the Far Clipping Plane value in the Inspector window
- Observe the “Canvas” GameObject behavior in the Game View
Expected result: The “Canvas” GameObject is always visible
Actual result: The “Canvas” GameObject is visible/invisible depending on the Far Clipping Plane value
Reproducible with: 2020.3.37f1. 2021.3.7f1, 2022.1.11f1, 2022.2.0b3, 2023.1.0a4
Reproducible on: Windows 10 (21H2)
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
- GameObjects change Hierarchy order when undoing adding Component to multiple GameObjects
- [macOS] Editor crashes after entering Play mode with overlapping GameObjects with Cloth Component and Cloth Inter-Collision enabled
- Look Dev constantly regenerates the default Volume Profile when set to "None" instead of using the default one
- Look Dev errors are spammed when opening a new HDRP project when Look Dev was added to the layout in the previous project
- URP Scene Templates are not editable when first opened from the New Scene dialog
Resolution Note:
Here's my take on the bug:
The Canvas Distance script executes this line of code `canvas.planeDistance = cam.farClipPlane;`.
In this case, I find it pretty unsurprising that the canvas flickers. It looks to me like a simple case of floating point equalities. Why not have something like `canvas.planeDistance = cam.farClipPlane - EPSILON;`, where the epsilon value is large enough avoid issues?
TLDR: I think the canvas is being frustum-culled because it is positioned right at the far plane. If you bring it a tiny bit closer, it won't flicker.
Resolution Note (2023.1.X):
Here's my take on the bug:
The Canvas Distance script executes this line of code `canvas.planeDistance = cam.farClipPlane;`.
In this case, I find it pretty unsurprising that the canvas flickers. It looks to me like a simple case of floating point equalities. Why not have something like `canvas.planeDistance = cam.farClipPlane - EPSILON;`, where the epsilon value is large enough avoid issues?
TLDR: I think the canvas is being frustum-culled because it is positioned right at the far plane. If you bring it a tiny bit closer, it won't flicker.