I know this has been discussed before, and I know that this was supposedly fixed, but I am experiencing the issue where my Xbox controller with the newer input system works in the editor, but when I create a build it no longer works. Using the ‘x86_64’ build doesn’t work for me. There’s another thread: Controller wrongly characterized as joystick for input (Logitech Dual Action) ?_ga=2.167776162.2083620687.1637611424-344982395.1593481681
where someone was talking about doing custom mapping to get around the problem, but I guess I don’t understand what they mean since I thought the custom mapping was the action map that I was already creating using the input system.
I am running the following code to check on controller input, and I DO get feedback on both the editor and build with this script, however the player never moves in the build.
using System;
using System.Collections.Generic;
using UnityEngine;
public class RecordControllerInput : MonoBehaviour {
private string[] joystickNames;
private float xAxis, yAxis;
private List<string> lastPressedKeys = new List<string>();
void Update () {
joystickNames = Input.GetJoystickNames();
xAxis = Input.GetAxis("Horizontal");
yAxis = Input.GetAxis("Vertical");
foreach ( KeyCode curKey in Enum.GetValues(typeof(KeyCode)) )
{
if (Input.GetKeyDown(curKey))
{
lastPressedKeys.Add(curKey.ToString());
if (lastPressedKeys.Count > 10)
lastPressedKeys.RemoveAt(0);
}
}
}
private void OnGUI()
{
GUILayout.Label("Joysticks:");
foreach (var curName in joystickNames)
GUILayout.Label(string.Format(" {0}", curName));
GUILayout.Label(string.Format("Axes: ({0}, {1})", xAxis, yAxis));
GUILayout.Label("Last pressed keys:");
foreach (var curKeyName in lastPressedKeys)
GUILayout.Label(string.Format(" {0}", curKeyName));
}
}
Any help is extremely appreciated!