Skip to main content

Module metadata

Module metadata 

Source
Expand description

global-metadata.dat: names and the shape of every type, method and field.

Types of fields, parameters and return values are indices into the Il2CppType table, which lives in the game binary, not in this file.

Three metadata versions are supported:

  • v29 (Unity 2021.2 – 2023.x): header entries are (offset, size) pairs.
  • v31 (later Unity 2022.3 LTS / 2023.x): identical to v29 except the method record gained a returnParameterToken field (so each record is 4 bytes larger). The section list, header-entry size and all other record layouts match v29. Implemented from the Il2CppDumper/Il2CppInspector reference layouts; unverified against a real v31 game (none available).
  • v39 (Unity 6): each header entry also carries a record count, so the entries are 12 bytes. Several records shrank: type_definitions dropped element_type_index and narrowed generic_container_index; methods narrowed its middle index fields (moving parameter_start); images and assemblies were reordered; generic_parameters narrowed owner_index. The v39 layout was reverse-engineered and validated against real Unity 6 games (which ship Windows PE binaries, read via pewter’s PE support).

Structs§

AssemblyDefinition
EventDefinition
FieldDefaultValue
A constant value for a field, stored in the default value data section.
FieldDefinition
GenericContainer
GenericParameter
ImageDefinition
Metadata
MethodDefinition
ParameterDefinition
PropertyDefinition
TypeDefinition

Type Aliases§

TypeDefinitionIndex
An index into Metadata::type_definitions.
TypeIndex
An index into the binary’s Il2CppType table.