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
- “Remove Unused Overrides” available on not loaded Scene and throws “ArgumentException: The scene is not loaded” warning
- Adaptive Probe Volume occlusion edge is calculated incorrectly when viewing probes near geometry edges
- Sampling a texture using an HLSL file throws shader errors and the code does not compile
- "Graphics.CopyTexture called with null source texture" error when Base Camera of an Overlay Camera is removed with DX11 Graphics API and Compatibility Mode enabled
- WebGL sends wrong value with large numbers when SendMessage function is used
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).