docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    The default project-wide actions

    When you create and assign default project-wide actions the action assets comes pre-configured with some default actions such as "Move", "Jump", and more, which suit many common app and game scenarios. They are configured to read input from the most common types of input controller such as Keyboard, Mouse, Gamepad, Touchscreen, and extended reality (XR).

    image alt text The Input System Package Project Settings after creating and assigning the default actions

    These default actions mean that in many cases, you can start scripting with the Input System without any configuration by referring to the names of the default actions that are already configured for you. You can also rename and reconfigure the default actions, or delete these default configurations to suit your needs.

    Default action maps

    The default project-wide actions contain two action maps: Player and UI. The following table lists the actions in the Player action map, and how to read the value of each action:

    Action Action type Control type Read the value with
    Move Value Vector2 ReadValue<Vector2>()
    Look Value Vector2 ReadValue<Vector2>()
    Attack Button Button IsPressed() or WasPressedThisFrame()
    Interact Button Button WasPerformedThisFrame(). The action has a Hold interaction, so it's performed only after the user holds the control.
    Crouch Button Button IsPressed() or WasPressedThisFrame()
    Jump Button Button IsPressed() or WasPressedThisFrame()
    Previous Button Button IsPressed() or WasPressedThisFrame()
    Next Button Button IsPressed() or WasPressedThisFrame()
    Sprint Button Button IsPressed() or WasPressedThisFrame()

    For the actions in the UI action map, refer to Default UI Action Map reference. For more information about reading action values, refer to Polling actions.

    The legacy default Actions Asset

    Note

    The default actions asset is entirely separate from the default project-wide actions. It is a legacy asset that is included in the package for backwards compatibility.

    The Input System package provides an asset called DefaultInputActions.inputactions which you can reference directly in your projects like any other Unity asset. The asset is also available in code form through the DefaultInputActions class.

    void Start()
    {
        // Create an instance of the default actions.
        var actions = new DefaultInputActions();
        actions.Player.Look.performed += OnLook;
        actions.Player.Move.performed += OnMove;
        actions.Enable();
    }
    
    
    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)