Hello! This is my first time working with activable widget and I found that only the first time when I use Push Content to Layer the assigned input mapping context for the activable widget would work, but in the later time the input mapping would not be activate when pushed again. I understand that the pushed widgets are being pooled and some of the things only works the first time when being construct, I am wondering if there is a function I can call in the blueprint to get the input map up for my activable widget. Thank you!
hi @Air_Wheel ,
Could you share a bit more info about how your Activatable Widget is set up , so I can try to give you a hand?
I think the assigned Input Mapping is working, but I assume you have an InputAction event in the same widget that does only work the first time?
I have a similar issue, where I push a CommonActivatableWidget
via an ability. In the widget itself is an InputAction event (lets call it IA_Next
). This input action is also added as an input context mapping in the ability (via EnhancedInputSubSystem → AddMappingContext).
The first time the widget is pushed it works perfectly fine, the IA_Next
action does its job and the widget also reacts to the event. The widget & ability then deactivates itself after a few seconds.
From the second time on the the ability gets activated and the widget is pushed, I see the widget but the IA_Next
event is not triggered anymore. (The input mapping works perfectly as the InputAction event is received in other blueprints)
I’ve noticed the:
* - Does not register to receive back actions (or any other actions, for that matter)
comment in the CommonActivatableWidget.h, but I’m still wondering the inconsistent behavior the first time.
And it did work for me in an 5.3 project (i’m now exploring 5.6)
But still, it would be nice to have certain input actions inside activatable Widgets.
Maybe someone knows more,
Thank you
I have the same issue, InputActions only work on the first activation of the widget. Have you ever found a solution or workaround for the problem?