Files
rea/docs/il2cpp-metadata.md
T

40 KiB

IL2CPP metadata

inspect_il2cpp_metadata / inspect-il2cpp-metadata decodes one selected local Unity IL2CPP global-metadata.dat file and returns its assembly images, type definitions, methods and named members with their owners, plus managed string literals, by stable index, namespace, range and count, with the header sections and serialized index widths. It reads the file without running it and requires no Unity installation, IL2CPP binary, active target, Hopper, Ghidra or IDA.

Metadata versions 24, 27, 29, 31 and 39 are supported. For example, Unity 2019.4.41f2 wrote version 24, 2020.3.49f1 version 27, 2022.3.30f1 wrote version 29, 2022.3.62f3 wrote 31 and 6000.4.2f1 wrote 39; other Unity releases that write these numbers have not been checked. Other versions are rejected as unsupported. Version 24 decoding covers the 264-byte header layout used by the cited Unity 2019.4 build; earlier 24.x layouts are not inferred from the version number and are refused when their header or records differ. The path must name a regular file; directories and symbolic links are rejected.

With binary_path, the tool also reads the matching native binary and links each method to its code address. See Native method addresses.

MCP

MCP defaults to a compact summary and retains the complete decoded Evidence in the session. MCP requires an absolute filesystem path:

{
  "name": "inspect_il2cpp_metadata",
  "arguments": {
    "path": "/artifacts/Data/Managed/Metadata/global-metadata.dat"
  }
}

The summary retains the complete decoded Evidence in the session and returns a linked inspect_analysis_view overview: artifact identity, metadata version, index widths and counts (sections, images, types, methods, nested_types, fields, properties, events, parameters and string_literals) without rows. Use normalized_result.parent_evidence_id to page the original rows without reopening or decoding the file:

{
  "source": {
    "kind": "retained-evidence",
    "evidence_id": "<parent_evidence_id>"
  },
  "view": {
    "kind": "il2cpp-metadata",
    "collection": "types",
    "offset": 0,
    "limit": 64
  }
}

Collections are sections, images, types, methods, fields, properties, events, parameters, string_literals, method_addresses, return_types, field_types, parameter_types, code_gen_modules, generic_method_instances and generic_method_issues. Every returned row includes its source index, scoped by artifact SHA-256 and collection. All collections accept batch indices and fields. Exact names filterin