Skip to content

Latest commit

 

History

History
22 lines (16 loc) · 1.39 KB

File metadata and controls

22 lines (16 loc) · 1.39 KB
uid input-system-input-from-code

Configure input from code

You can set up actions, bindings, and related settings in the Input Actions editor or with code. Use the topics in this section when you want full control in script, need to generate or load definitions at runtime, or prefer not to rely on a dedicated Input Action asset.

Topic Description
Declare stand-alone actions Expose InputAction and InputActionMap fields on a MonoBehaviour and configure them in the Inspector window or in code.
Configure input from JSON Create or load InputActionMap and InputActionAsset instances from JSON strings at edit time or runtime.
Create actions in code Create and configure actions entirely in code.
Configure bindings from code Work with InputBinding in code: add or remove bindings, composites, parameters, overrides, and control schemes.

For a high-level map of the actions API (enabling, polling, callbacks), refer to Scripting with actions API overview.

Additional resources