Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    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