xbox controller issues

I have tried to use everything I could find to get the controller to work but it is not. Also unity does not like the code other people are using in their scripts which seems odd to me. I need to know how to set the controller up properly and just a very basic movement script like forward,backward, side-to-side, and rotate. its for a first person camera if that helps. Thanks!

you can use the Input.GetAxisRaw("Horizontal") or ("Vertical") to recieve the -1 to +1 range from either keyboard or game pads. Other than that the inputs are just down to your own set inputs, for example what you set "fire1" as. Just make sure you have the inputs available for a gamepad in your input list, go to Edit > project settings > input and you can customise the inputs there, there should be 2 horizontal and verticals one is keyboard input, the other is game pad. Otherwise you can try just building your game, and when it comes to running it, you can customise your button config there.

It seems that the editor in play mode does not detect the joystick.

To test joystick controls, you must build and run the game in standalone mode.

Click File → Build & Run

Once your game runs, the controller works just fine.

Hope this helps, it did frustrate me the first time, but with some short experimenting it was fairly easy to figure out.