# InvalidOperationException: 无法重新绑定动作'Jump'，因为控件'Keyboard/space'已绑定到同一动作映射中的动作'Fire'

- **ID:** `unity/input-system-usage-conflict`
- **领域:** unity
- **类别:** runtime_error
- **验证级别:** ai_generated
- **修复率:** 90%

## 根因

同一输入动作映射中的两个动作共享相同的绑定路径，在运行时重新绑定时导致冲突。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| Unity 2022.3 | active | — | — |
| Unity 2023.1 | active | — | — |
| Input System 1.7.0 | active | — | — |

## 解决方案

1. ```
   Open the Input Action Asset in the editor, select the 'Fire' action, and change its binding path to a different key (e.g., 'Mouse/leftButton'). Then rebind 'Jump' to 'Keyboard/space'. Alternatively, use composite bindings like '1D Axis' to share controls with modifiers.
   ```
2. ```
   In code, before rebinding, check for conflicts using InputActionRebindingExtensions.GetBindingIndexForControl and manually unbind the conflicting action. Example: var rebind = action.ApplyBindingOverride(newBindingPath, conflicts: InputBinding.MaskByGroup("Keyboard"));
   ```

## 无效尝试

- **** — Disabling the conflicting action does not free the binding; the conflict persists in the asset. (50% 失败率)
- **** — Deleting and recreating the action map from scratch may lose all bindings and is overkill. (30% 失败率)
