Controller input works in editor but not in build

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!

You say you’re using the new input system but I don’t really see you utilizing it here. In fact, it looks like you’re still using the old Input System.

The new input system would just require you to call something like Gamepad class to read from a controller if you so choose to use it tat way.

The code above was just to see what input I’m getting, it’s not my input code. But now I’m wondering if I’m nuts. Is the newest Input Manager stuff not the Action Map stuff? That’s what I’ve been using. Is there a newer input system than that one, using just the Gamepad class as you mentioned above?

It is using action maps as you’ve said. I was just matching the code from you post.

You can define action maps in code a various number of ways. I would definitely do some good tutorials on the system. There’s a ton of info I can’t fit into a post.

Ok. So I appreciate your help, but again, I’ve done the Action Maps, and have watched several tutorials. It works great in the editor, but immediately stops working after creating a build. This is a known issue, but was reported as fixed, but folks were saying they were still having the problem, which seems to be my case.