Hi all, I’m creating a UI that can be closed via a key press and then reopened (this works fine the first time it’s opened), however when the UI opens for a second time it no longer receives keyboard inputs. I’ve done some research but haven’t encountered anyone with quite my issue, any help would be greatly appreciated! I’m just starting out with UE, so there’s a possibility I’m completely missing something.
I don’t quite remember how UMG worked but I’ll try to direct you a bit. Maybe you’ll find the solution.
I think to get keyboard input the widget must be in focus. Try to SetFocus on it after opening. (also make widget focusable)
Another thing - Remove from Parent is a bit extreme. I’m not sure how it works exactly but I think it is meant to discard and destroy (prepare for garbage collection) the widget. Try to SetVisibility as Collapsed or Hidden instead. Especially if you are planning on showing the widget again. (Note that hidden/collapsed widgets don’t tick so its not like you’ll have any meaningful overhead)
I tried playing around with the focus, but nothing I attempted worked. Setting the visibility to collapsed/visible is the solution I’m currently going with.