UMG - Disable/Enable receiving input, for specific widgets.

I have multiple widgets, taking input, stacked within each other. And when I press button, they start to fight for input, and only the one highest in hierarchy receive it, while rest does not.

If there way to disable/enable input receiving, for widgets at runtime ?

You can set visibility in UMG for the widgets ‘Visable’ means visible and can revive input ‘hit test invisible’ means visible on screen but no input. So you can get reference to UMG then reference to the widget and use the ‘set visablity’ node.

2 Likes

Thanks, but the problem is, that widgets block each other input from keyboard/gamepad. For mouse, it’s pretty easy to get working.

In your widget, you can use “Set Input Mode UIOnly” to give a Widget, or element in a widget exclusive input control. You can then “Set Input Mode Game Only” to return to gameplay controls.

This is an old post but for reference, none of the solutions offered worked for me in UE5.0
But I got things working using the “Listen for input action” and “Stop Listening for Input Action” nodes.

1 Like

o/ You can set the priority for given InputComponent of UUserWidget or block input for those who do not need them
image

You can also simply unregister InputComponent altogether to remove widget from any input interaction, check those

Hope that helps