In game "Connected controller indicator"?

Hi, I’m working on a game made for 2 players in coop and I would like to know if there was a way to show to the player(s) if 2 controllers are indeed connected to the PC (like with images of controller that turn on when connected).

I’ve done some research and I think I’m supposed to use Input.GetJoystickNames() but I don’t really understand how to do it.

Thanks!

Hi
I haven´t tried myself, but it looks like you have to define your joysticks first in Project settings / Input.
By default, all joysticks gets input from all connected joysticks. You have to change that so each joystick only gets input from the one you select.

Then just loop through them for a while to see which ones are alive.

Thank you very much, it worked!

1 Like