docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Reset a device

    Resetting a Device resets its Controls to their default state. You can do this manually using InputSystem.ResetDevice:

        InputSystem.ResetDevice(Gamepad.current);
    

    There are two types of resets as determined by the second parameter to InputSystem.ResetDevice:

    Type Description
    "Soft" Resets This is the default. With this type, only controls that are not marked as dontReset are reset to their default value. This excludes controls such as Pointer.position from resets and thus prevents mouse positions resetting to (0,0).
    "Hard" Resets In this type, all controls are reset to their default value regardless of whether they have dontReset set or not.

    Resetting Controls this way is visible on Actions. If you reset a Device that is currently driving one or more Action, the Actions are cancelled. This cancellation is different from sending an event with default state. Whereas the latter may inadvertently perform Actions (For example, a button that was pressed would not appear to have been released), a reset will force clean cancellation.

    Resets may be triggered automatically by the Input System depending on application focus.

    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)