# InvalidOperationException: InputActionMap 'Gameplay' not found in InputActionAsset 'Controls'.

- **ID:** `unity/input-system-action-map-not-found`
- **Domain:** unity
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 95%

## Root Cause

Code references an InputActionMap name that does not exist in the assigned InputActionAsset asset.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 1.4 | active | — | — |
| 1.5 | active | — | — |
| 1.6 | active | — | — |
| 1.7 | active | — | — |

## Workarounds

1. **Open the InputActionAsset (e.g., 'Controls.inputactions') in the editor, verify the map name is 'Gameplay', and correct the code: InputActionMap gameplayMap = inputAsset.FindActionMap("Gameplay"); If the map is named differently, update the string.** (98% success)
   ```
   Open the InputActionAsset (e.g., 'Controls.inputactions') in the editor, verify the map name is 'Gameplay', and correct the code: InputActionMap gameplayMap = inputAsset.FindActionMap("Gameplay"); If the map is named differently, update the string.
   ```
2. **Use FindActionMap with a fallback: var map = inputAsset.FindActionMap("Gameplay") ?? inputAsset.FindActionMap("Default"); This prevents crashes but may not bind the correct actions.** (70% success)
   ```
   Use FindActionMap with a fallback: var map = inputAsset.FindActionMap("Gameplay") ?? inputAsset.FindActionMap("Default"); This prevents crashes but may not bind the correct actions.
   ```
3. **Regenerate the InputActionAsset from a template that includes the missing map: right-click > Create > Input Actions, then copy the map structure from the old asset.** (85% success)
   ```
   Regenerate the InputActionAsset from a template that includes the missing map: right-click > Create > Input Actions, then copy the map structure from the old asset.
   ```

## Dead Ends

- **** — Random names never match the asset; the name must exactly match the one in the .inputactions file. (90% fail)
- **** — This loses all existing bindings and requires reconfiguring controls, which is overkill for a missing map name. (40% fail)
- **** — ListEnabledActions returns actions, not maps; it does not help locate the correct map name. (70% fail)
