Announcement

Collapse
No announcement yet.

4.13 widget components break normal actor input

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    4.13 widget components break normal actor input

    Hi, I'm having a problem with 3D widget components as of 4.13. The widgets themselves work perfectly, but while they have focus they break all input which is normally routed through actor input components (including pressing Escape to exit PIE). This worked ok in 4.12.

    It looks like the problem is because the widgets are now hosted in a SVirtualWindow rather than being a child of the SViewport, so un-consumed key events are no longer able to bubble up to the SViewport to be distributed to input components.

    This can be tested fairly easily using a new blank blueprint-only project:

    - Make a simple input action (I used controller face button top)
    - Make an actor blueprint, add a handler for the input action which prints 'Hello'. Enable auto receive input for Player 0.
    - Create a UMG widget blueprint, place a button which when pressed prints 'Button'. Add a function which sets keyboard focus to the button.
    - Returning to the actor blueprint, add a widget component and assign your widget as the widget type.
    - Add an event for BeginPlay which sets focus to the game viewport (so you don't have to click into the game viewport to begin pressing keys), followed by a short delay, followed by calling your widget's function to set focus to the button.

    - Place an instance of the actor in the level and press play. Pressing escape doesn't work. Pressing the test action key also doesn't work. Pressing enter/A will correctly invoke the widget's button and print 'Button' to the screen. You'll have to click with the mouse to take focus back from the widget in order to escape PIE.

    Does anyone have any fix/workaround for this?
Working...
X