{
  "id": "unity/argumentexception-mesh-indexbuffer-format",
  "signature": "ArgumentException: Index buffer format is not supported for this mesh topology. Use 16-bit indices or change topology to triangles.",
  "signature_zh": "ArgumentException：此网格拓扑不支持索引缓冲区格式。请使用 16 位索引或更改拓扑为三角形。",
  "regex": "ArgumentException: Index buffer format is not supported for this mesh topology",
  "domain": "unity",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "A mesh with 32-bit index format is being used with a non-triangle topology (e.g., lines, points) which only supports 16-bit indices in Unity.",
  "root_cause_type": "generic",
  "root_cause_zh": "使用了 32 位索引格式的网格与不支持 32 位索引的非三角形拓扑（例如线条、点）组合。",
  "versions": [
    {
      "version": "Unity 2022.3.15f1",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Unity 2023.2.0a18",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Unity 2021.3.35f1",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "The error occurs because 32-bit indices are not allowed for non-triangle topologies; forcing UInt32 doesn't fix topology incompatibility.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Compression affects vertex data, not index format or topology.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Skinned mesh renderers also use the same index format constraints.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Change the mesh topology to triangles (MeshTopology.Triangles) in your script before assigning indices, or ensure the mesh asset is imported with triangle topology.",
      "success_rate": 0.85,
      "how": "Change the mesh topology to triangles (MeshTopology.Triangles) in your script before assigning indices, or ensure the mesh asset is imported with triangle topology.",
      "condition": "",
      "sources": []
    },
    {
      "action": "If you must use lines or points, ensure vertex count is below 65535 so 16-bit indices suffice. Set mesh.indexFormat = IndexFormat.UInt16 and rebuild the mesh.",
      "success_rate": 0.75,
      "how": "If you must use lines or points, ensure vertex count is below 65535 so 16-bit indices suffice. Set mesh.indexFormat = IndexFormat.UInt16 and rebuild the mesh.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Change the mesh topology to triangles (MeshTopology.Triangles) in your script before assigning indices, or ensure the mesh asset is imported with triangle topology.",
    "If you must use lines or points, ensure vertex count is below 65535 so 16-bit indices suffice. Set mesh.indexFormat = IndexFormat.UInt16 and rebuild the mesh."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://docs.unity3d.com/ScriptReference/Mesh-indexFormat.html",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2023-11-05",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}