{
  "id": "unity/input-system-action-map-not-enabled",
  "signature": "InvalidOperationException: Cannot read value for action 'Jump' because the action map 'Gameplay' is not enabled",
  "signature_zh": "InvalidOperationException: 无法读取动作'Jump'的值，因为动作映射'Gameplay'未启用",
  "regex": "InvalidOperationException: Cannot read value for action.*because the action map.*is not enabled",
  "domain": "unity",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "The Input Action Map containing the action is not enabled before trying to read its value, typically because Enable() was not called on the map or the InputActionAsset.",
  "root_cause_type": "generic",
  "root_cause_zh": "包含该动作的输入动作映射在尝试读取其值之前未启用，通常是因为未对映射或InputActionAsset调用Enable()。",
  "versions": [
    {
      "version": "Unity 2022.3",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Unity 2023.2",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Input System 1.5.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Input System 1.6.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Overrides bypass the normal input flow and can cause stale values or conflicts with actual input devices. The action map still remains disabled.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "This defeats the purpose of using action maps for contextual input (e.g., UI vs Gameplay) and may break input switching logic.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Enabling individual actions without the parent map can lead to inconsistent state and may not register input correctly if the map is disabled.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "In Awake() or Start(), enable the action map before any input read: inputActionAsset.FindActionMap(\"Gameplay\").Enable(); or use inputActionAsset.Enable() to enable all maps.",
      "success_rate": 0.95,
      "how": "In Awake() or Start(), enable the action map before any input read: inputActionAsset.FindActionMap(\"Gameplay\").Enable(); or use inputActionAsset.Enable() to enable all maps.",
      "condition": "",
      "sources": []
    },
    {
      "action": "If using PlayerInput component, set the Default Map in the inspector to the desired map, and ensure the component is enabled on the GameObject.",
      "success_rate": 0.9,
      "how": "If using PlayerInput component, set the Default Map in the inspector to the desired map, and ensure the component is enabled on the GameObject.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use InputAction.Enable() on each action after setting up callbacks, but ensure the parent map is also enabled to avoid conflicts.",
      "success_rate": 0.85,
      "how": "Use InputAction.Enable() on each action after setting up callbacks, but ensure the parent map is also enabled to avoid conflicts.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "在Awake()或Start()中启用动作映射，然后再读取任何输入：inputActionAsset.FindActionMap(\"Gameplay\").Enable(); 或使用inputActionAsset.Enable()启用所有映射。",
    "如果使用PlayerInput组件，在检查器中设置默认映射为所需映射，并确保组件在游戏对象上已启用。",
    "在每个动作上设置回调后使用InputAction.Enable()，但确保父映射也已启用以避免冲突。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://docs.unity3d.com/Packages/com.unity.inputsystem@1.6/manual/ActionMaps.html",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.88,
  "fix_success_rate": 0.95,
  "resolvable": "true",
  "first_seen": "2023-08-01",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}