Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question How to detect if the joystick is plugged in or unplugged?

Discussion in 'Input System' started by LeoFeitosa, Jul 6, 2021.

  1. LeoFeitosa

    LeoFeitosa

    Joined:
    Jul 5, 2017
    Posts:
    32
    Hello everybody.
    I'm a beginner and I'm having trouble detecting the exact moment when the joystick is plugged in or unplugged. I would like to use this to pause the game as soon as the joystick is disconnected, but I don't know how to do it, could someone help me?
     
  2. Twin-Stick

    Twin-Stick

    Joined:
    Mar 9, 2016
    Posts:
    111
  3. LeoFeitosa

    LeoFeitosa

    Joined:
    Jul 5, 2017
    Posts:
    32
  4. Twin-Stick

    Twin-Stick

    Joined:
    Mar 9, 2016
    Posts:
    111