{
  "id": "unity/input-system-action-not-found",
  "signature": "InvalidOperationException: InputAction 'Player/Move' is not enabled. Cannot read value.",
  "signature_zh": "InvalidOperationException：InputAction 'Player/Move' 未启用。无法读取值。",
  "regex": "InvalidOperationException: InputAction '.*' is not enabled\\. Cannot read value\\.",
  "domain": "unity",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "An InputAction is being read via ReadValue() before it has been enabled (e.g., before InputSystem.EnableDevice or action map activation).",
  "root_cause_type": "generic",
  "root_cause_zh": "在 InputAction 启用之前（例如在 InputSystem.EnableDevice 或操作映射激活之前）通过 ReadValue() 读取该操作。",
  "versions": [
    {
      "version": "Unity 2022.3",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Unity 2023.1",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Unity 2021.3",
      "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": "Calling Enable() on the action inside Start() or Awake() may still fail if the InputSystem hasn't initialized yet.",
      "fail_rate": 0.3,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Disabling and re-enabling the action map in Update() causes repeated overhead and doesn't fix timing.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Using InputAction.ReadValue<float>() without checking isPressed first can still throw if not enabled.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Enable the action map before reading values: `InputActionMap actionMap = inputActions.FindActionMap(\"Player\"); actionMap.Enable();` then call `inputActions.FindAction(\"Move\").ReadValue<Vector2>();`",
      "success_rate": 0.9,
      "how": "Enable the action map before reading values: `InputActionMap actionMap = inputActions.FindActionMap(\"Player\"); actionMap.Enable();` then call `inputActions.FindAction(\"Move\").ReadValue<Vector2>();`",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use event-based callbacks instead of polling: `inputActions.Player.Move.performed += ctx => { Vector2 value = ctx.ReadValue<Vector2>(); };`",
      "success_rate": 0.95,
      "how": "Use event-based callbacks instead of polling: `inputActions.Player.Move.performed += ctx => { Vector2 value = ctx.ReadValue<Vector2>(); };`",
      "condition": "",
      "sources": []
    },
    {
      "action": "Delay the first read until after InputSystem.Update() by checking `InputSystem.isInitialized` and using a coroutine.",
      "success_rate": 0.85,
      "how": "Delay the first read until after InputSystem.Update() by checking `InputSystem.isInitialized` and using a coroutine.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Enable the action map before reading values: `InputActionMap actionMap = inputActions.FindActionMap(\"Player\"); actionMap.Enable();` then call `inputActions.FindAction(\"Move\").ReadValue<Vector2>();`",
    "Use event-based callbacks instead of polling: `inputActions.Player.Move.performed += ctx => { Vector2 value = ctx.ReadValue<Vector2>(); };`",
    "Delay the first read until after InputSystem.Update() by checking `InputSystem.isInitialized` and using a coroutine."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://docs.unity3d.com/Packages/com.unity.inputsystem@1.6/manual/Actions.html",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.88,
  "fix_success_rate": 0.92,
  "resolvable": "true",
  "first_seen": "2023-09-01",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}