Assign Gamepad To Specific Player Input In New Scene

Hello,
I’ve recently run into a standstill in my game that is like Mario Kart.
I have a Menu scene that has a player input system and I need some type of method to get say Player 1’s assigned gamepad and assign it in the next scene to Player 1. As of rn, both scenes require a player to press a button to join. The problem with this is that in the Game scene when a player joins the order of who’s player 1,2,3,4 get’s messed up causing players not to spawn as the character they selected. Plus I want the player to spawn automatically and already be assigned the correct corresponding gamepad. It’s rather inconvenient to make all players ready up before the game may begin.

My idea as of rn is to use Gamepad.current and to save this as a global var and assign players for example:

if(Gamepad.current == GameObject.Find("GlobalController").GetComponent<GlobalVariables>.player1AssignedController){
 thisTexture = assignedTextureForPlayer; 
//etc 
}

However, I’m hopeful there’s a better way. All ideas and questions are welcomed!
Thanks!

Solved this issue by using

PlayerInput.Instantiate(spawnPlayer, controlScheme: "Gamepad", pairWithDevice: Gamepad.all[0]);

Here’s what I entered:

void Awake()
{
    DontDestroyOnLoad(gameObject);
}

private void Update()
{
    if (SceneManager.GetActiveScene().name != "Menu" && !spawnedCars)
    {
        spawnedCars = true;
        int i = 0;
        while(i < playerCount)
        {
            PlayerInput spawnedCar = PlayerInput.Instantiate(spawnPlayer, controlScheme: "Gamepad", pairWithDevice: Gamepad.all*);*

spawnedCar.GetComponent().myPlayerNum = (i + 1);
foreach (string getTexture in avaterText)
{
if(getTexture.Contains(“P” + (i + 1)))
{
SetTexture(spawnedCar.gameObject, getTexture, (i + 1));
}
}
i++;
}
}
}