Enhanced input issue

Hello everyone,
I am continuing to explore Enhanced Input, and I have a question.
There is InputAction:


There is InputMappingContext:

When Triggered, I create a widget, and when Completed, I destroy it:

However, in this widget, SetInputModeUIOnly is set during Construct, and because of this, my InputAction calls Canceled:

How can we ensure that when creating a widget, the player cannot move, the mouse is visible, and InputAction works correctly?

Thx..

Hi, the quickest messy solution would be to clear the variable you store of the radial widget using Set node and passing nothing in, that’d mean when it’s called again a new one would get created instead of reusing the existing one.

In older versions of the engine it used to be that calling AddToViewport constructed the widget again but that’s been changed to be a fire only once event in the widgets lifetime.

If you want to be much cleaner, make an init and deinit function and call those when you know you want the radial to be on and off, this gives you much clearer control and easier to understand it’s state.