Jump to content
Setting up an AI agent? ReverseEngineering.wiki skill (works from the command line, no configuration): https://reverseengineering.wiki/skill/rewiki/SKILL.md · setup for every client, including MCP: https://reverseengineering.wiki/llms.txt · REWiki:Connect

Library:Unity

From ReverseEngineering.wiki
Library
Vendor Unity Technologies
Website https://unity.com
On this wiki Facts · Code · Notes · Topics

Unity, the game engine by Unity Technologies: games are a native player plus either Mono assemblies (Managed/*.dll) or an IL2CPP native library, and their content lives in serialized files, asset bundles and streamed .resS/.resource files.

Overview

A built Unity game on desktop has <Game>_Data/ next to the player executable. Identification:

  • UnityPlayer.dll (Windows), UnityPlayer.so/libunity.so (Linux/Android), UnityFramework (iOS). Its version string is the Unity version (for example 2021.3.16f1); the same string is inside every Format:Unity serialized file (version 7+) and every Format:Unity asset bundle (UnityFS).
  • <Game>_Data/Managed/Assembly-CSharp.dll means the Mono backend: a normal .NET assembly (Format:.NET metadata (ECMA-335)) that a .NET decompiler reads.
  • GameAssembly.dll / libil2cpp.so plus <Game>_Data/il2cpp_data/Metadata/global-metadata.dat (Android: assets/bin/Data/Managed/Metadata/global-metadata.dat) means IL2CPP: native code, names in Format:IL2CPP global-metadata.dat.
  • Data files: globalgamemanagers, levelN, sharedassetsN.assets, resources.assets (+ .resS streams); WebGL builds ship *.data(.br), *.wasm (Format:Brotli); Addressables/AssetBundles are UnityFS.

Topic subpages: Library:Unity/Game folder layout (per-platform folders, Mono versus IL2CPP files), Library:Unity/Version and boot.config, Library:Unity/Addressables catalog, Library:Unity/PlayerPrefs.

Workflow

  1. Read the Unity version from the player or any data file.
  2. Mono: open Assembly-CSharp.dll in a .NET decompiler. IL2CPP: run Il2CppDumper with the native library and the metadata to get dump.cs, DummyDll and a script that names functions in IDA or Ghidra.
  3. Assets: AssetRipper (reconstructs a Unity project), AssetStudio, or UnityPy scripts read bundles and serialized files. Without type trees a Unity-version-matching class database is needed.

Tools (source read, not run)

  • Il2CppDumper (Perfare, MIT): IL2CPP metadata 16-31.
  • UnityPy (K0lb3, MIT): Python reader and writer for bundles and serialized files; enumerations of class ids, texture formats and build targets.

See Fact:Unity serialized file/enum/BuildTarget and Fact:Unity serialized file/enum/Common class ids.

Topics

  • Game folder layout — Where a built Unity game keeps its player, data folder, Mono assemblies or IL2CPP library and metadata, per platform, as AssetRipper's game-structure…
  • Version and boot.config — How to find the Unity version of a game from its serialized files and bundles, and what the plain-text boot.config in the data folder contains.
  • Addressables catalog — The Addressables content catalog (catalog.json or the binary catalog.bin, often wrapped in a bundle): how to recognise it, the JSON fields, the packed…
  • PlayerPrefs — Where Unity's PlayerPrefs save data lives on each platform: registry key on Windows, plist on macOS, XML on Android, files on Linux, NSUserDefaults on iOS…

Code & repositories

  • https://github.com/Perfare/Il2CppDumper @ 4741d46ba9cd6159c5d853eb9d6fc48b4bfa2b1a · license: MIT
    Restores names and addresses from IL2CPP games. Useful without running: Il2CppDumper/Il2Cpp/MetadataClass.cs (metadata header and table structs per version), Il2CppClass.cs (Code/MetadataRegistration), Utils/SectionHelper.cs (registration search).
    Tested on: source read, not run: source read, not run: read the metadata structs and the registration search; not built · checked 2026-10-18; last activity 2024-08-18; Note: the latest release ships binaries; the wiki links only the source, never the binaries
  • https://github.com/K0lb3/UnityPy @ 417d59522a998fdee9a9c2b29fe35f3063222457 · license: MIT
    Python reader/writer for Unity bundles and serialized files. Useful without running: UnityPy/files/BundleFile.py, SerializedFile.py, enums/ (ClassIDType, BuildTarget, TextureFormat, BundleFile flags).
    Tested on: source read, not run: source read, not run: read BundleFile.py, SerializedFile.py and the enums; not run · checked 2026-10-18; last activity 2026-10-05
  • https://github.com/nesrak1/AddressablesTools @ 3dbc8210a10c9ef0592580bb6710b5623fcc8d33 · license: MIT (declared by the contributor; GitHub's detector did not recognize a license file)
    Reads and writes Addressables catalogs (JSON v1-3, binary v1-3). Useful without running: AddressablesTools/Binary/ContentCatalogDataBinaryHeader.cs, Catalog/ContentCatalogData.cs (bucket/key/entry tables), JSON/ContentCatalogDataJson.cs, Classes/AssetBundleRequestOptions.cs.
    Tested on: source read, not run: source read, not run · checked 2026-10-18
  • https://github.com/AssetRipper/AssetRipper @ beeb50ee1c223e856c860caa338e5309404956a3 · license: GPL-3.0 (declared by the contributor; GitHub's detector did not recognize LICENSE.md)
    Unity asset extractor and project reconstructor. Useful without running: Source/AssetRipper.Import/Platforms/*GameStructure.cs (per-platform folder layout, Mono/IL2CPP detection). GPL-3: read for knowledge, copy no code.
    Tested on: source read, not run: source read, not run · checked 2026-10-18
  • https://github.com/Perfare/AssetStudio @ d158e864b556b5970709c2a52e47944d53aa98a2 · license: MIT (declared by the contributor for the files used; GitHub reports MIT (read from LICENSE; GitHub's API was busy) for the repository)
    GUI explorer and exporter for Unity assets and bundles; AssetStudio/ holds the file readers (BundleFile, SerializedFile). Only linked, its contents were not read in detail.
    Tested on: source read, not run: source not read in detail · checked 2026-10-18