UMG Widget Events broken behavior with mouse interaction
In the sample project provided, I have a "Hud" user widget in the viewport when play is pressed. It shows a simple button with multiple layers all marked self-hit-test-invisible except the button. The Hovered/Unhovered and Clicked events are defined for the test.
Expected behavior (works in 4.15.1):
Unexpected behavior (broken in 4.16.1):
Please see attached sample project in 4.15 then migrate to 4.16.1 to compare before and after.
I believe that this is working as intended and that the issue is actually occurring in 4.15, here's why.
Your project's setup in 4.15 has your checkbox at the bottom of the hierarchy, which means that your checkbox is rendered above all other components (See Screenshot_01). This means if working as intended, the button should not be accessible for events such as hovering or being pressed because the checkbox is being rendered on top of it. This is the behavior that is being displayed in 4.16.
In 4.15, despite the checkbox being rendered on top of your button, the button is still able to register events, this behavior is unintended. When you are upgrading your project to 4.16 this unintended behavior is being corrected in 4.16, this is what is causing the issue you are experiencing in 4.16.
To work around this issue, simply reorder so that your button lower in the hierarchy (screenshot_02).
Image of how Z Order renders Image of reordered hierarchy
answered Jun 07 '17 at 08:29 PM
Thomas G ♦♦ STAFF
Follow this question
Once you sign in you will be able to subscribe for any updates here