[4.7.3] Set Input Mode UIOnly locks input on level switch

Hello,

I ran into a strange bug where my input was completely ignored if I switched levels while the game was paused. The project I am currently working on is a bit big now and started from around 4.3, so I don’t know if it’s feasible to attempt to reproduce.

The general setup that I had that caused this to happen:

  1. Have a ‘Title Screen’ level and the actual game level
  2. Title screen loads into main game level with a UMG button that calls ‘Open Level’ node
  3. Pause the game to go into the pause menu and return to title screen using ‘Open Level’ node
  4. All input lost; can’t even push ESC to quit game from viewport (Mouse input still works)

The way I fixed it was simple once I got to thinking about how pause affects parts of the engine. Before the player returns to the ‘Title Screen’ from the pause menu, I unpause the game.

EDIT: Changed topic title from “Set game paused can potentially stop all input when level switching (and a quick fix)” to “Set Input Mode UIOnly locks input on level switch”

The problem was related to the ‘Set Input Mode UI Only’ node being called right before the level switch. After I removed the call to the node, everything was fine.

Hello kevin_g,

I was unable to reproduce this issue on our end with the information provided. I have a few questions that will help narrow down what issue it is you are experiencing.

Quick questions:

  1. I see that you mentioned it may not be possible to reproduce this issue in a clean project. Could you check see if the current blueprint setup that you are using can reproduce this issue when re-made in a clean project?
  2. If so, could you provide any differences or discoveries that will help reproduce this issue on our end?
  3. Could you provide screen shots of the blueprints involved with this issue?

Hey Rudy,

I’ll get try to get some more info up later today when I get some free time.

Found the issue. It’s related to this node:

34839-capture.png

If this is enabled prior to a level switch, then all input will be locked.

Quicker repro node setup in any blank project:

After the setup is complete, push the button to restart the level. You will then lose all input except for mouse. ESC won’t quit the in-editor game and Shift + F1 will not bring out the mouse (must alt+tab or some other OS method to bring out the mouse).

The problem was related to the ‘Set Input Mode UI Only’ node being called right before the level switch. After I removed the call to the node, everything was fine.

The way I fixed it was calling Set Input Mode Game Only right after the level switch node.