PlayerInput es un componente del Input System pensado para asociar un jugador con sus Input Actions.

Agregarlo

En el GameObject del jugador:

Add Component → Player Input

Después asignás el asset de Input Actions.


Obtener referencia

using UnityEngine.InputSystem;

public class PlayerController : MonoBehaviour
{
    private PlayerInput playerInput;

    void Awake()
    {
        playerInput = GetComponent<PlayerInput>();
    }
}

Action Map actual

Debug.Log(playerInput.currentActionMap.name);

Cambiar Action Map

playerInput.SwitchCurrentActionMap("UI");

Control Scheme actual

Debug.Log(playerInput.currentControlScheme);

Dispositivos asociados

foreach (var device in playerInput.devices)
{
    Debug.Log(device.displayName);
}