Search Issue Tracker
Not Reproducible
Votes
1
Found in
4.6.1p5
Issue ID
667610
Regression
Yes
Raycasters sorting doesn't match Canvas sorting
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.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- DownloadHandlerScript.CompleteContent is called twice when building for WebGL
- Scene view has Y coordinates of the Screen Position node flipped when some of the URP features are disabled
- Volumetric fog shader variants are missing from build when "Strict Shader Variant Matching" is disabled
- Unnecessary modifications clutter the Scene when using a RectTransform driven by a LayoutGroup in a Prefab
- Files in the target folder are deleted without a proper warning when building an iOS project
Add comment