BP - SetUIMode & ShowCursor - Side Effect


I found something really strange during some testing in PIE with 2 players.

If you create a UI in UMG.
Set in the tick function SetUIMode to GameOnly and Cursor to Off.
You will see that the Input Key are completly broken when PIE with 2 player (if you have just 1 player, it’s fine)
If you set ShowDebug Input, you will see that when you press a key it move from 0 to 1 to 0 whereas you are still pressing the Key.

It was a mistake to put that in the Tick function instead of the Construct Event, but set the UI Mode & cursor to off (which means that nothing have to changed after the first Tick) should not affect the Input manager.



I was unable to reproduce the part of the issue where you state " press a key it move from 0 to 1 to 0 whereas you are still pressing the Key." As for the second statement regarding the tick event. The “Set input mode to UI only” node does not effect the tick event. Setting the input mode affects the inputs given by the player. The Tick event is going to continue to run in the back ground until the object calling it is stopped or removed. I have a few questions for you that will help narrow down what issue it is that you are experiencing.

Quick questions:

  1. Could you elaborate on the issue that you are experiencing (example: How are things difference between playing with one player as apposed to playing with two?)?
  2. Can you reproduce this issue in a clean project?
  3. If could could you provide a more detailed set of steps to reproduce this issue on our end?

Here are some details explanations of the issue:

  • In case of a 2 player PIE, if you set the “ShowDebug Input” on in the console, you can see what keys are pressed and their current values (0 not pressed, 1 pressed). In my case, when I was pressing my key, the value goes from 0 to 1 to 0 to 1 etc… instead of being fixed to 1.
  • In the BP Tick Event, You should set the node “Set input mode to Game Only” and “Set Cursor to Off
  • With only one player, I didn’t notice any issue and the input was working perfectly. In 2 player, I have the issue I described in point 1. As a consequences, your character will move badly as it thinks that you are pressing, unpressing the keys many times in a second…
  • To sumup the issue, when calling the Set Input mode to GameOnly & Cursor off in tick event, you have an impact on the game in 2 player PIE.

If you set the UI UMG Tick event with the 2 nodes with a 2 player PIE, does the Show debug input logs are correct on your side?

I hope you will be able to reproduce the bug. If not, I will try to give you a project to test this later on.



After looking over your post again I realized that I had misunderstood what you meant by 2 players in PIE. I thought that you had been using the create player node and so I could not reproduce it on our end. However, after running multiple clients I found that I could reproduce this issue. I have written up a report ( UE-18375) and I have submitted it to the developers for further consideration. I will provide updates with any pertinent information as it becomes available. Thank you for your time and information

Make it a great day

Good news.