New to scripting help request please? Mapping a Xbox button not a keyboard key?

Hi, How would I change this from a key press to a button press (Xbox controller, button (B) please?)…

Many thanks :slight_smile:

#region singleton
public static BCG_EnterExitSettings instance;
public static BCG_EnterExitSettings Instance{ get{if(instance == null) instance = Resources.Load(“BCG_EnterExitSettings”) as BCG_EnterExitSettings; return instance;}}
#endregion

public bool enableEnterExit = false;

// Unity Inputs
public KeyCode enterExitVehicleKB = KeyCode.E;
public bool keepEnginesAlive = true;
public float enterExitSpeedLimit = 20f;

}

This may or may not help:

As an image

1 Like

Looks exactly what I need, thank you VERY much Mauri :smile: