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
- Setting ArticulationBody.collisionDetectionMode at runtime via script to Discrete does not work if its being set from Continuous
- [iOS] Crash on ScriptingGCHandle::Acquire when calling RequestUserAuthorization without using yield for pending authorization
- Particle is not visible in RenderTexture when Renderer's material is set to Default-Particle and Camera's BG Alpha is set 0
- OnTriggerExit is not called when GameObject leaves Trigger through reparenting
- [Physics] Character Joint jumps around when following Kinetic Rigidbody
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).