create_input_mapping_context
Create an Unreal Engine Enhanced Input Mapping Context asset to group key-to-action bindings per game mode, then push or pop it so existing keys are reused instead of using another global key.
Instructions
Create an Enhanced Input mapping context asset (IMC_): the container that binds keys to InputActions and can be pushed and popped as a set. Prefer a context per MODE (driving, swimming, building, menu) over one key per verb -- pushing a context re-purposes the existing keys instead of consuming another global one. Empty on creation: fill it with map_input_action / add_mapping_to_context, and check the keys are free first with find_free_input_key. The asset is saved, and the call succeeds only when it reaches disk.
Returns: { context_name, context_path, saved, save_error? }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Fallback for package_path when package_path is absent. | |
| asset_path | No | Alias of `path` (same value, same meaning). Accepted because sibling tools spell this parameter differently; prefer `path`. | |
| context_name | Yes | Name of the new InputMappingContext. | |
| package_path | No | Target content package path where the asset is created (default /Game/Input). |