docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Create a user paired with an input device

    You can use the InputUser.PerformPairingWithDevice method to create a new InputUser instance and pair it with an InputDevice. You can also optionally pass in an existing InputUser instance to pair it with the Device, if you don't want to create a new user instance.

    To query the Devices paired to a specific InputUser, use InputUser.pairedDevices. To remove the pairing, use InputUser.UnpairDevice or InputUser.UnpairDevices.

    Initial engagement

    After you create a user, you can use InputUser.AssociateActionsWithUser to associate Input Actions to it, and use InputUser.ActivateControlScheme to associate and activate a Control Scheme. You can use InputControlScheme.FindControlSchemeForDevice to pick a control scheme that matches the selected Actions and Device:

    var scheme = InputControlScheme.FindControlSchemeForDevice(user.pairedDevices[0], user.actions.controlsSchemes);
    if (scheme != null)
        user.ActivateControlScheme(scheme);
    

    When you activate a Control Scheme, the Input System automatically switches the active binding mask for the user's Actions to that Control Scheme.

    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)