Search Issue Tracker

Not Reproducible

Votes

1

Found in

4.6.1p5

Issue ID

667610

Regression

Yes

Raycasters sorting doesn't match Canvas sorting

UI

-

uGUI: Raycasters sorting doesn't match Canvas sorting (4.6.1p5)

# PROBLEM
When you have 2 Canvas with 'Screen Space - Overlay' render mode on same scene, set 'Sort Order' of one of the canvas to '-1' and leave the other as is ('0'). Now the canvas with sort order '-1' is visually displayed behind other canvas, but is the first one to receive clicks. Issue appears since version 4.6.1p2 of uGUI ( https://bitbucket.org/Unity-Technologies/ui/commits/7ac0f0d81f26c75250053db863a1b63bcf10c4bd?at=4.6 ) commit #7ac0f0d81f26c75250053db863a1b63bcf10c4bd , where EventSystem.RaycastComparer logic has been changed.

I assume that problem comes from the base value of sortOrderPriority and renderOrderPriority in BaseRaycaster. They should also be changed to int.MinValue (because lower value has higher priority).

# REPRODUCTION
Launch provided sample project and click on highlighted area.

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.