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 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.

Question Why am I getting different behaviour in the Build?

Discussion in 'Input System' started by Simon-O, Nov 23, 2022.

  1. Simon-O


    Jan 22, 2014
    I'm trying to map WASD + Gamepad left stick to camera movement.


    So A/Left arrow is left, D/Right arrow is right.

    I've had issues with the UI trying to consume those key presses, so for the moment I've deleted all UI actions.

    For the time being, I'm polling the axes in a method invoked from Update():


    This works perfectly in the editor, however, when I build the game, pressing `A` results in moving right when it should move left. Pressing `D` also moves right.

    Left arrow works as expected, but both A and Left arrow are configured identically...

    upload_2022-11-23_19-40-38.png upload_2022-11-23_19-40-52.png

    The debug output shows that MoveLeftRight.ReadValue() is returning +1 for the axis when it should be -1.

    There are no other indications anything is wrong/unusual.

    Why is it flipping one half of the axis at runtime? How can I prevent this?