First of all, I am Dragan. I have been playing with Unreal Engine 4 for quite some time, and now I have built game that I plan to release later this year.
Recently I have tried to build shipping version of game and I am having issue with 2nd controller when I build game. If I play game from editor (PIE) it works fine.
Here is my implementation:
I have created:
- one actor that manages some things around map (lets call it ManagerActor). ManagerActor is set to automatically receives input from first player (player index 0; keyboard and gamepad 1)
- Player2Controller that handles input actions defined in project; Also onBeginPlay controller finds ManagerActor and stores in variable; when receives input it makes appropriate call to ManagerActor
- GameMode that will create player by calling CreatePlayer with ControllerID: -1 (auto assign); I have also set Player2Controller as default
Now problem is that Player2Controller is not receiving any input when I build game ready for shipping.
If I run game PIE it works without issues (that is only way it works).
If I run game also from editor, but in separate window then it also doesn’t work.
I have gone through many online tutorials that I have found for adding 2nd controller support, but I still have same issue.
Some things I have tried:
- creating Player2Pawn; also tried with assiging to Player2Pawn custom controller: Player2Controler
- creating Actor which will autoreceive input for player with index 1 (I have tried other indexes as well)
- GameMode to spawn Player2Pawn and make Player2Controller to posses it
None of that fixed issue.
Everything is done in blueprints.
I have 2 gamepads, both working without issues in other games.
Running Windows 10, UE 4.19
Controllers are DS4 emulated with DS4Windows (in games it is working fine)
Can someone help me with this?