Download

Gamepad (un-)plug events and/or get number of attached gamepads support?

Hi all - first post so apologies if I don’t adhere to the correct etiquette/am posting to the wrong subforum!

I’m currently porting a game from a custom engine over to UE4 (4.14.1, if that matters!), but I’m a bit stuck with PlayerControllers. My game is a multiplayer co-op (single viewport) game.

Right now, I am able to use the “Create Player” blueprint function to create as many players as I like, and have them controlled with the correct controller; this all works perfectly.

However, in my engine I was spawning players when a controller is plugged in, and despawning on removal. Is there a way to handle these events? Failing that, is there just a way to detect how many controllers are plugged in at least, so that I can loop that many times and create the correct number of PlayerControllers and thus pawns?