I tried myself through the Enhanced Input System of 5.1 today… and got a strange Problem.
I created an Input Action that has a trigger for “Pressed”, and a Mapping Context with this IA, that fires on hitting the “i” Key.
The mapping Content is added in the Player Controller’s BeginPlay.
And I added the Input Action Event, that fires a print on Triggered.
When I now start Multiplayer in Standalone (cause servertravel…) with EOS as Subsystem, I can hit “i” on both Windows… but only the joined Player has Input actions and fires a print… The host Player is not reacting…
Did I miss something to enable the Enhanced Input System in Multiplayer?
Hey, I have some suggestions and I think you will find the answer somewhere within here. It does however sound like you have set up the enhanced input system correctly, causing it to not work as expected in multiplayer. Try these to further troubleshoot the issue:
Make sure that the input action and its associated mapping context are being added to the player controller’s input component on both the client and server sides.
Check that the input action’s “bExecuteWhenPaused” property is set to true. This ensures that the input action will still be processed even when the game is paused.
In the Input Action Event, make sure that you are calling the function on the server side only by using the “Run on Server” node.
Make sure that the enhanced input system is enabled in your project settings. Go to Project Settings → Engine → Input and check that the “Use Enhanced Input System” option is checked.
Make sure that the Input Mapping Context is set to the correct value. In your case, you want to check that the Input Mapping Context is set to PlayerController.
Verify that your PlayerController Blueprint is set up correctly. Make sure that the Player Controller’s input component has the input action and mapping context added to it in the Blueprint’s BeginPlay event.
Make sure that the EOS subsystem is set up correctly. In your case, check that the EOS subsystem is correctly set as the default online subsystem in the project settings. (Should be on by default in 5.1)
It’s also possible that the problem is related to a bug or limitation of the enhanced input system in multiplayer. If none of these solutions solve the problem, you may want to consider using the legacy input system or seek help from the Unreal Engine community.
Please let me know if some of my suggestions were helpful!
The Problem now is:
The UI_HUD Widget (a UserWidget) should be created, if the current Level is not the Lobby.
Therefor, the GM tests if the level name contains “000_Lobby”, the name of the Lobby Level.
So… the Client_BeginPlay has to create the Lobby, if it is inside the Lobby Level (that works!) and create the HUD, if not in the Lobby (only works for the joined client, not the host client…)
Means… the EIS Input is triggered… but nothing is shown, beside a print string in the Trigger event, that UI_HUD is not valid on the host client side…