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/Version and boot.config

From ReverseEngineering.wiki
Topic page of Library:Unity.

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.

Reading the Unity version

The version is a string like 2021.3.16f1 (year, minor, patch, type letter a/b/f/p, build number). Places, most reliable first:

  1. Serialized file (globalgamemanagers, levelN, sharedassetsN.assets): from file version 7 on, the metadata section starts with the endian flag (for version 9+) and then the version string, NUL-terminated; from file version 8 an int32 build target follows (Fact:Unity serialized file/enum/BuildTarget). In version 22+ files the metadata block is found through the wider header (Format:Unity serialized file#Header). UnityPy reads it in UnityPy/files/SerializedFile.py (reader.read_string_to_null() when header.version >= 7).
  2. UnityFS bundle / data.unity3d: the header has two NUL-terminated strings after the format version: the player version (often the literal 5.x.x) and the engine version, which is the real one (Format:Unity asset bundle (UnityFS)). UnityPy keeps it as version_engine.
  3. Fallback case: a serialized file inside a bundle may carry 0.0.0 or an empty string (stripped builds); UnityPy then takes the bundle's engine version. A reader with neither must be told a version by hand, because type layouts differ per version.
  4. Player binary (Unverified: not read in a source): UnityPlayer.dll has a Windows version resource whose file version looks like the Unity version, and the version string also appears as plain text in the player. To check: read the resource with a PE tool and compare with globalgamemanagers.

AssetRipper uses the first reliable source: globalgamemanagers in the data folder, else the header of data.unity3d (Source/AssetRipper.Import/Platforms/PlatformGameStructure.cs, GetUnityVersionFromDataDirectory).

boot.config

<Name>_Data/boot.config (Android: assets/bin/Data/boot.config, Unverified) is a plain text file of key=value lines that the player reads at start before the engine is up. Samples from public repositories (read, not run):

gfx-enable-gfx-jobs=
gfx-enable-native-gfx-jobs=
wait-for-native-debugger=0
scripting-runtime-version=latest
vr-enabled=0
hdr-display-enabled=0

and from a server build gfx-enable-gfx-jobs=1, gfx-enable-native-gfx-jobs=1, gc-max-time-slice=3, build-guid=<32 hex digits>. Empty values are allowed. Observed keys: gfx-enable-gfx-jobs, gfx-enable-native-gfx-jobs, wait-for-native-debugger, single-instance, scripting-runtime-version, vr-enabled, hdr-display-enabled, gc-max-time-slice, build-guid.

Unverified: the file is not authoritative for the version or backend; it is edited by players to change threading options, and the engine seems to ignore unknown keys. build-guid probably identifies the build and matches the identifier in other build outputs (not checked).

Related

Library:Unity, Library:Unity/Game folder layout.