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.

Bug Xbox 360 button issues

Discussion in 'Input System' started by GibsSCake, Mar 14, 2023.

  1. GibsSCake

    GibsSCake

    Joined:
    Jul 11, 2016
    Posts:
    1
    Some of my players are having issues: the buttons on their xbox 360 controllers are not registering inputs (see thread: https://steamcommunity.com/app/2198030/discussions/0/3787002916511577295/) and I have no idea what could be causing it. However the joystick works. Could anyone point me in a direction?

    Here's the code I use to access input, it's really simple (segment is an integer between 0 and 3):

    Code (CSharp):
    1. Gamepad pad;
    2. Keyboard key;
    3.  
    4. _GetController(controllerId, out pad, out key);
    5.  
    6. switch(segment) {
    7.   case 0: return (pad != null && pad.buttonEast.wasPressedThisFrame);
    8.   case 1: return (pad != null && pad.buttonSouth.wasPressedThisFrame);
    9.   case 2: return (pad != null && pad.buttonWest.wasPressedThisFrame);
    10.   case 3: return (pad != null && pad.buttonNorth.wasPressedThisFrame);
    11. }
    Thanks