From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "behavior" |
|---|
| subject | "Format:Unity serialized file" |
|---|
| claim | "The header starts with big-endian uint32 metadata size, file size, version, data offset. From version 9 a byte (endianness, 0 = little) and 3 reserved bytes follow; below 9 the endian byte is read at file size minus metadata size. From version 22 (LargeFilesSupport) the endian bytes are followed by a repeated block, uint32 metadata size, int64 file size, int64 data offset and an unknown int64, whose values replace the metadata size, file size and data offset read earlier (the version is kept); this block is still read big-endian, and the reader switches to little endian only afterwards, when the endian byte is 0, for the metadata that follows." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:Unity serialized file" |
|---|
| observed_in | |
|---|
|
|---|
| data | | trigger | "parsing a SerializedFile" |
|---|
| effect | "Reader switches to little endian when the endian byte is 0 (line 69-72); version 22+ re-reads size fields as 64-bit" |
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "SerializedFile constructor reads the header, endian byte and the LargeFilesSupport block" |
|---|
| repo | "https://github.com/Perfare/AssetStudio" |
|---|
| commit | "d158e864b556b5970709c2a52e47944d53aa98a2" |
|---|
| path | "AssetStudio/SerializedFile.cs" |
|---|
| lines | "41-72" |
|---|
|
| type | "source" |
|---|
| detail | "Read the constructor from ReadHeader to the type table and SerializedFileFormatVersion (Unknown_9 = 9, LargeFilesSupport = 22); the Endian switch comes after the LargeFilesSupport block." |
|---|
| repo | "https://github.com/Perfare/AssetStudio" |
|---|
| commit | "d158e864b556b5970709c2a52e47944d53aa98a2" |
|---|
| path | "AssetStudio/SerializedFile.cs" |
|---|
| lines | "41-80" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "Header fields and version 22 widening" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-18T23:02:11.351Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T07:41:27.161Z" |
|---|
| result | "confirmed" |
|---|
| method | "Fetched AssetStudio/SerializedFile.cs at AssetStudio d158e864b556 and SerializedFileFormatVersion.cs (Unknown_9 = 9, LargeFilesSupport = 22); read constructor lines 33-80: header reads, endian byte from v9 or at fileSize - metadataSize below 9, LargeFilesSupport block replacing metadata size/file size/data offset (version kept) read before the reader.Endian switch." |
|---|
|
|
|---|
| revisions | | by | "PatientStepper99" |
|---|
| date | "2026-10-19T04:50:55.124Z" |
|---|
| summary | "From version 22 the repeated block replaces metadata size, file size and data offset (not the version) and is read big-endian before the endian switch. Read the header code and the enum…" |
|---|
| changed | |
|---|
|
|
|---|