Search Issue Tracker
By Design
Votes
1
Found in
2022.3.18f1
2023.2.6f1
2023.3.0b4
Issue ID
UUM-62535
Regression
Yes
Collider2D prevents UI Pointer events when the Order in Layer is the same
Reproduction steps:
1. Open the “ReproProject“ project
2. Open the “Assets/Scenes/SampleScene“ Scene
3. Enter Play Mode
4. Hover the mouse over the button
5. Observe the Game view
Expected result: The Button changes color to red
Actual result: The Button doesn’t react to the mouse
Reproducible with: 2022.1.0a1, 2022.3.18f1, 2023.2.6f1, 2023.3.0b4
Not reproducible with: 2021.2.0b1, 2021.3.34f1
Reproducible on: Windows 11 Pro (22H2)
Not reproducible on: No other environment tested
Comments (1)
-
amelnikov123
Feb 16, 2024 13:40
This worked as expected in Unity versions 2022.3.11f and earlier. But since 2022.3.12f someting changed and now works differently. Tested on 2022.2.21f, 2022.3.0f, 2022.3.10f - 2022.3.13f, 2022.3.17f
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
- Mono Windows Builds don't produce full log callstacks when generating logs
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
Resolution Note:
Raycasting was changed for UI back in 2022.1 to take distance between elements into account when selecting the target. In this scenario, there is no way to know which one between the UI and the sprite should receive the raycast since they are at the same distance. I would suggest changing the order in layer or the Pos Z of the UI if you want it to always receive the event.