Bindings in code
Add, change, and erase bindings, set their parameters, and override them at runtime from your scripts.
Everything you can do with bindings in the Input Actions Editor window, you can also do with the InputBinding API. For information about creating the actions themselves in code, refer to Create actions in code.
| Topic | Description |
|---|---|
| Add, change, and erase bindings in code | Add bindings to actions, change and erase them, assign them to control schemes, and look up the properties of a binding. |
| Add composite bindings in code | Add composite bindings, bind each part to one or more controls, and set the composite's parameters. |
| Create custom composite bindings | Define your own composite type in a script, register it, and give it a custom editor UI. |
| Set binding parameters in code | Get and override the parameters of the processors, interactions, and composites on your bindings. |
| Apply binding overrides in code | Change a binding's path, processors, or interactions at runtime without changing the binding itself. |