Detect connected controller?

Is there a way to detect whether a controller is connected or not? I’m currently working on a game that can either be played with mouse and keyboard or a controller with the end goal of hiding the cursor when a controller is plugged in.

Only suitable function is found is this and it requires overriding UGameViewportClient:

Which also means you can do that only in C++. You check if bGamepad if true, if it’s true you hide cursor, then if you detect mouse movement you unhide. Other way around and this ill work in blueprint is to detect gamepad via bindings, but it more clamsy way.

Detection of gamepad connection sounds like a good suggestion (maybe already available in PS4 and XbOne UE4 platfrom APIs which we don’t have access to). But even so blocking mouse and keyboard because gamepad is been connected is kind of bad workflow on PC, what if user have pad but he wants to play on K/M? :stuck_out_tongue: so detecting input activity and switch by detection which is being used i think it’s most suitable for task.

I’m not looking to disable it entirely. I want to make it so that if the mouse cursor essentially hides after a controller is used and reappears if the mouse moves. This should help tremendously though. Thank you!

+1 Yep need this too.

I also need this. Trying to show button prompts in the game that are relevant the the controller being used.

possible solution here, have a look

link text