Search Issue Tracker
By Design
Votes
0
Found in
2020.1.0a19
2020.1.13f1
2020.2
2021.1
2021.2
Issue ID
1303204
Regression
Yes
Child Image of a Button marked with Block Raycasts doesn't block the click
How to reproduce:
1. Open the attached "1303204.zip" project
2. Open the "SampleScene" Scene
3. Enter Play Mode
4. Press the blue square in the middle of the Button
Expected results: Pressing the blue square doesn't give an output to the console
Actual results: After pressing the blue square on the button writes "Click" in the console
Reproducible with: 2020.1.0a19, 2020.1.17f1, 2020.2.3f1, 2021.1.0b1, 2021.2.0a3
Not reproducible with: 2019.4.19f1, 2020.1.0a18
Could not test with: 2018.4.30f1 (can't downgrade the project due to errors)
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
- [Android] Stage information is not logged when Log Shader Compilation is enabled
- [Vulkan] The memory allocation increases rapidly when there are multiple (three or more) Real-Time Reflection Probes in the Scene
- [macOS] Library folder of the opened project can be deleted which leads to the crash
- “Default Scene” dropdown field contains a spelling mistake “Default Builtin”
- Editor crashes on PPtr<Mesh> after adding Text Mesh and Cloth Components to the same GameObject
Resolution Note (2021.2.X):
In the version it was introduced the click target object became its own cached object. The CanvasGroup.blockraycast doesnt prevent the system from bubbling up the event to its parent (otherwise clicking on text or regular image on a button wouldn't work). In this case the need to inherit OnPointClick (the same way OnPointerDown is used) is required to capture the event (the CanvasGroup is doing nothing in this example).