Search Unity

Question NSO SNES Controller with new Input System.

Discussion in 'Input System' started by PixelsOPlenty, Dec 15, 2020.

  1. PixelsOPlenty

    PixelsOPlenty

    Joined:
    Dec 18, 2019
    Posts:
    1
    I've installed the new input system, and it works fine with my XBOX Series X controller and my Switch Pro Controller just fine, however I can't seem to get it to see my (Nintendo Switch Online) Bluetooth SNES controller. I was just wondering if there was anyway for me to get Unity to recognize it. I'm using the code bellow. Thanks in advance.

    Code (CSharp):
    1.         var gamePad = Gamepad.current;
    2.         bool gamePadConnected;
    3.         if (gamePad != null)
    4.         {
    5.             gamePadConnected = true;
    6.         }
    7.         else
    8.         {
    9.             gamePadConnected = false;
    10.         }
    11.  
    12.         if (fromFixedUpdate)
    13.         {
    14.             if (gamePadConnected && gamePad.dpad.up.isPressed)
    15.             {
    16.                 pressingUp = true;
    17.                 Debug.Log("Working");
    18.             }
    19.             else
    20.             {
    21.                 pressingUp = false;
    22.                 Debug.Log("Not Working");
    23.             }
    24.  
    25.         }