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
- Unity CIL Linker fails on Player build when persistent listeners have "<" and ">" in their XML attribute names
- ”Lighting data asset ‘LightingData’ is incompatible with the current Unity version…” warnings are thrown when saving Indoors (URP) and Outdoors (URP) Scenes as Scene Templates
- [iOS] The screen blinks when transitioning from custom to Unity splash screen
- [macOS] ”Ignoring depth surface load action as it is memoryless” warnings are thrown when taking Game View Snapshot
- UI Builder Inspector scrolls back up when changes on an expanded but not fully displayed Inspector tab are saved
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.