- Home /
Xbox 360 Controller Build Issue - Unity 2019.1.2f1
I'm making a game with Unity 2019.1.2f1 for Window 7 64bit. In editor, my controls (using the builtin Input System) works as intended: every player can be controlled using any type of controller. In build, here are the results using multiple peripherals:
Mouse and Keyboard - Worked as intended.
Xbox One Controller - Worked well but encountered some bugs.
Xbox 360 - Unplayable but recognized by Unity.
This is what I tried for the Xbox 360 Controller:
Plugging the Controller in Multiple USB Ports.
Using a Wired 3rd Party Controller and an Official Wireless Controller.
Plugging one or multiple joysticks at the same time.
Restarting my computer, the editor (all controllers still work here), and the build.
Running the build when the editor is closed.
I haven't look too deep into the build nor the build settings. I remember being able to get a similar setup working for Unity 2018. Is this an issue related to the new update? Any ideas?
Here two of my Input System settings:
And here is the code handling my inputs:
void FixedUpdate()
{
// Joystick -> Joystick to use.
float fireAxis = Input.GetAxis(joystick + "_Fire");
float jumpAxis = Input.GetAxis(joystick + "_Jump");
float cycleAxis = Input.GetAxis(joystick + "_Cycle");
float horizontalAxis = Input.GetAxis(joystick + "_Horizontal");
float verticalAxis = Input.GetAxis(joystick + "_Vertical");
if (fireAxis != 0 && !fire) Shoot();
else if (fireAxis == 0) fire = false;
if (cycleAxis != 0 && !cycle) Cycle(cycleAxis);
else if (cycleAxis == 0) cycle = false;
if (jumpAxis != 0 && !downSlam && !jump) Jump();
else if (jumpAxis == 0) jump = false;
if (horizontalAxis != 0) Move(horizontalAxis);
}
Your answer
Follow this Question
Related Questions
Distribute terrain in zones 3 Answers
360 controller setup and recognition(?) problems OSX Tattie Bogle 1 Answer
How to create and set different Player ID's to individual controllers? 0 Answers
Unity on Centos 0 Answers
Lagging Background 2 Answers