This is a pretty weird mistake that I’m stuck with and I don’t know how to fix. In my game there are 2 different APawns each one using my custom APlayerController class and both are controlled with a different gamepad. The control of each of the APawns works well inside the editor with the viewport at normal size and also when I launch the game in Standalone mode both in full screen and normal.
The problem comes when inside the editor in runtime the Immersive Mode is activated by pressing the F11 key. When I do this the input of my second APlayerController stops working completely, then when I press again the F11 key to switch from Immersive Mode to normal mode the input of the second APlayerController works again.
I’ve been doing some research and once I press F11 the second APlayerController stops running the “Input Axis” and “Input Key” functions of the APlayerController class, I’ve put breakpoints on those two functions and they don’t activate.
I also researched the “RequestMaximizeViewport” and “MaximizeViewport” functions within the FLevelViewportLayout class which are activated when the F11 key is pressed to enable or disable the Immersive Mode, but I have not found anything that disables the input of my second APlayerController.
The only clue I got is that once I switched to the Immersive Mode, when the FSlateApplication class process the input with the **“ProcessAnalogInputEvent” **function, the first APlayer Controller who works well calls the “OnFocusReceived” function of the **SViewport **class instead of the second APlayerController who calls
the “OnFocusReceived” function but from the SWidgetClass.
I don’t understand what part of the Immersive mode change causes this and why one of the APlayerController works and the other doesn’t.
I’d like to find a workaround to this problem as it’s quite frustrating to lose input from one of the players while you’re testing things in the editor.
I tried to check if in the change of mode the connection of one of the gamepads is lost but everything works fine and I don’t know what to do anymore.
Massively appreciate any advice to solve this problem.