Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

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