Search Unity

Turning off PS4 Controller won't disconnect [new input system]

Discussion in 'Input System' started by kris8360, May 18, 2022.

  1. kris8360

    kris8360

    Joined:
    Jan 11, 2013
    Posts:
    34
    Hi,
    I am using the New Input System (v1.3), and Unity 2021.3 LTS.

    If I connect my ps4 controller through bluetooth, and then turn it off with the ps button, it won't disconnect.
    I don't get any events from InputSystem OnDeviceChange.

    It still shows up in GamePad.current, and sometimes it reads random inputs, makes my character crouch and stuff like that, while the controller is turned off and I am not touching it.

    I can even see in the Input Debug window:
    upload_2022-5-18_9-29-28.png

    Connecting/Disconnecting with an USB cable works fine, I still get the correct events.

    Is there any way to detect when it is turned off?

    Thanks