Search Issue Tracker

Fixed in 2018.3.X

Votes

0

Found in

5.6.1f1

Issue ID

912396

Regression

No

Raycast hits ignores 2nd Canvas which is drawn in front

uGUI

-

Steps to reproduce:

1) Download attached project 'Canvas Sorting.zip' and open in Unity
2) Open scene 'test' and press Play
3) Hover mouse cursor on white image, then on GUI text
Observe result on the screen:
The raycast hits the text when the mouse is over the text, and the background when mouse is over the white image (check attached gif 'works.gif')
4) Hover mouse on the blue side
Observe result on the screen:
The raycast always hits the background (check attached gif 'doesntWork.gif')

Expected result: When there are 2 Canvas, raycast should hit object which is drawn in front instead of whatever canvas object is deeper in its hierarchy
Actual result: When there are 2 Canvas, raycast hits object which is deeper in its hierarchy

Reproduced with:
5.5.3p3, 5.6.1p1, 2017.1.0b6

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.