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.
  2. We’re making changes to the Unity Runtime Fee pricing policy that we announced on September 12th. Access our latest thread for more information!
    Dismiss Notice
  3. Dismiss Notice

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?