An InputAction is a named thing the player can do, like "Move", "Jump" or "Fire", in the new Input System. Keys and buttons (bindings) are attached to it. Your code reads the action and doesn't care which device triggered it.
A restaurant order. Your code is the kitchen: it only needs to hear "one Jump, please". Whether the order came from the counter (keyboard), the drive-through (gamepad) or an app (touchscreen) is the waiter's job. The bindings are the waiters. Add a new waiter (a new device binding) and the kitchen code doesn't change at all.
How the pieces fit
Piece
What it is
Example
Input Action Asset
A file holding all your input setup
InputSystem_Actions.inputactions
Action Map
A group of actions used together. Enable one map at a time for different modes.
"Player", "UI", "Vehicle"
Action
One thing the player can do
"Jump" (Button), "Move" (Value, Vector2)
Binding
A control that triggers the action
Space key, gamepad South button
Composite binding
Several keys combined into one value
WASD → a Vector2
Many bindings feed one action, and your code only talks to the action. Adding a new device means adding a binding; the code on the right never changes.
Action types
Type
Use for
Button
Press/release: jump, fire, interact
Value
Continuous values: movement stick (Vector2), trigger pressure (float)
Pass Through
Like Value, but reports every device separately. Advanced.
Properties
Name
Type
Description
name
string
The action's name.
enabled
bool
Disabled actions report nothing.
bindings
list of InputBinding
All bindings on this action.
actionMap
InputActionMap
The map this action belongs to.
Methods
Method
Returns
Description
ReadValue<T>()
T
Current value, e.g. ReadValue<Vector2>() for Move, ReadValue<float>() for a trigger.
WasPressedThisFrame()
bool
Like GetKeyDown.
WasReleasedThisFrame()
bool
Like GetKeyUp.
IsPressed()
bool
Like GetKey: true while held.
WasPerformedThisFrame()
bool
True the frame the action completed, respecting interactions like Hold or Tap.
Enable() / Disable()
void
Turn on/off. Actions from your own assets start disabled; project-wide actions (InputSystem.actions) are enabled automatically.
GetBindingDisplayString(int bindingIndex)
string
Human-readable name, e.g. "Space" or "A". For "Press [E] to interact" prompts.
Events
Event
Fires when
started
Input began (button went down, stick left the center).
performed
The action "happened" (button pressed; for Value actions, every time the value changes).
canceled
Input ended (released, stick back to center).
All three pass an InputAction.CallbackContext. Use ctx.ReadValue<T>() to get the value.
Code Samples
Polling (read every frame)
using UnityEngine;
using UnityEngine.InputSystem;
public class PollingPlayer : MonoBehaviour
{
private InputAction move;
private InputAction jump;
void Awake()
{
move = InputSystem.actions.FindAction("Move");
jump = InputSystem.actions.FindAction("Jump");
}
void Update()
{
Vector2 input = move.ReadValue<Vector2>();
transform.position += new Vector3(input.x, 0f, input.y) * 5f * Time.deltaTime;
if (jump.WasPressedThisFrame()) Debug.Log("Jump");
}
}
Callbacks (react to events)
using UnityEngine;
using UnityEngine.InputSystem;
public class CallbackPlayer : MonoBehaviour
{
[SerializeField] private InputActionReference fireAction; // pick the action in the Inspector
void OnEnable()
{
fireAction.action.performed += OnFire;
fireAction.action.Enable();
}
void OnDisable()
{
fireAction.action.performed -= OnFire;
}
private void OnFire(InputAction.CallbackContext ctx)
{
Debug.Log("Fire!");
}
}
What happens at runtime
Devices send events (key down, stick moved) to the Input System as they happen.
By default, just before each frame's Update, the Input System processes those events and checks which bindings they match.
Matching actions change phase (Waiting → Started → Performed → Canceled) and fire the corresponding C# events.
The values you poll with ReadValue and WasPressedThisFrame reflect this processed state for the whole frame.
Common Mistakes
Action never fires. It isn't enabled. Call Enable() (or its map/asset's Enable()).
FindAction returns null. The name doesn't match, or you're using InputSystem.actions without a project-wide asset set in Project Settings > Input System Package.
Subscribing without unsubscribing. After the object is destroyed, the callback still runs and throws MissingReferenceException. Always -= in OnDisable.
Movement "sticks" after releasing keys when using only performed. Also handle canceled (which gives zero), or just poll with ReadValue.