Search Issue Tracker

By Design

Votes

0

Found in

2017.4

2018.4

2019.2

2019.2.1f1

2019.3

2020.1

Issue ID

1177418

Regression

No

UI Elements' layering breaks when there is a Transparent object in between of them

uGUI

-

How to reproduce:
1. Open the attached 'UILayeringBug.zip' project using the EnvIronman VM (optional) (more information in Edit)
2. In the Hierarchy window select 'Canvas' > 'Move This'
3. In the Inspector window change 'Pos Z' value to 250
4. Observe the Game window

Expected result: Default UI Material is rendered on top of TransparentMaterial
Actual result: TransparentMaterial is rendered on top of Default UI Material

Reproducible with: 2017.4.32f1, 2018.4.8f1, 2019.2.3f1, 2019.3.0b1, 2020.1.0a1

Notes:
1) Removing the 'Breaks Layering - Try removing' image results in the same behavior
2) The behavior is as expected when the non-transparent images are the same distance from the transparent image, for example, one of them is at Z = 250 and another one is Z = -250, while transparent material is at Z = 0, however, when 'Move This' is moved to Z = 251, the transparent image is rendered on top of the non-transparent
3) The issue does not reproduce when the transparent material's Custom Render Queue is set to a lesser value than the Default UI Material's Custom Render Queue (for example -2)

  1. Resolution Note (2020.1.X):

    After looking at the issue this is by design. UI renders as one object based upon the bounds of the canvas plane. UI Elements in front or behind that plane are rendered as if they are on that plane. When the 3D object is moved closer to the camera then the canvas it will render ontop of all UI elements.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.