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

  1. 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.

Comments (1)

  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

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.