Metadata

Definition

A managed assembly holds tables that list its types, their members, signatures, attributes, and the strings the code uses. The runtime needs them to load classes, resolve calls, and support reflection. In a Mono build the metadata stays inside each DLL. In an IL2CPP build it is moved into global-metadata.dat because the native code still has to look names and strings up.

Relevance

The runtime uses metadata to load classes and resolve calls. The names you chose are stored in the assembly, and an IL2CPP build keeps those same tables in global-metadata.dat because the native code still looks them up.

Example

The runtime loads PlayerHealth, finds TakeDamage in the metadata tables, and uses that row to resolve the call. The name, parameters, and return type are stored in the assembly for the runtime.

Connected