docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Look up bindings

    You can retrieve the bindings of an action using its InputAction.bindings property which returns a read-only array of InputBinding structs.

    Warning

    It looks like the sample you are looking for does not exist.

    Also, all the bindings for all actions in an InputActionMap are made available through the InputActionMap.bindings property. The bindings are associated with actions through an action ID or action name stored in the InputBinding.action property.

    Warning

    It looks like the sample you are looking for does not exist.

    You can also look up the indices of specific bindings in InputAction.bindings using the InputActionRebindingExtensions.GetBindingIndex method.

    Warning

    It looks like the sample you are looking for does not exist.

    Finally, you can look up the binding that corresponds to a specific control through GetBindingIndexForControl. This way, you can, for example, map a control found in the controls array of an InputAction back to an InputBinding.

    Warning

    It looks like the sample you are looking for does not exist.

    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)