Input Actions were necessary for us because we wanted both keyboard and controller input in the game. There is an entire window in the editor for Input Actions. There's a super convenient "Listen" feature which allows you to press a button on a keyboard and controller and it will automatically map it for you (rather than forcing you to sift through a bunch of menus). There can be simple button presses, 1D axes, 2D axes, etc. depending on the use case. These bindings then need to be set up in whatever script you want to receive input, like so:
[SerializeField] private InputActionAsset gameManagerControls;
// this is an input action for quitting the application
private InputAction quitAction;
// in Awake you need to find it
void Awake()
{
quitAction = gameManagerControls.FindAction("Quit");
}
// in Update, use quitAction.triggered to actually check for input
void Update()
{
if (quitAction.triggered)
{
Application.Quit();
}
}
// then in OnEnable and OnDisable you need to set them
void OnEnable()
{
quitAction.Enable();
}
void OnDisable()
{
quitAction.Disable();
}