-
Notifications
You must be signed in to change notification settings - Fork 0
/
specification.txt
110 lines (90 loc) · 2.95 KB
/
specification.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
EARLIER VERSIONS (version 0x03)
[HEADER]
<TODO>
# HEADER - BIGENDIAN (16 bytes)
metadata 4 bytes
filesize 4 bytes
version 4 bytes
data offset 4 bytes
-------------------------------------------------------------------------------
UNITY 4 VERSION (version 0x09)
[HEADER]
<TODO>
# HEADER - BIGENDIAN (20 bytes)
metadata 4 bytes
filesize 4 bytes
version 4 bytes
data offset 4 bytes
endianness 1 byte
------ 3 bytes of padding -------
-------------------------------------------------------------------------------
BIG FILE SUPPORT (version 0x16)
[HEADER]
[UNITY_VERSION] until null byte
[HEADER TAIL]
[ASSET TYPES]
[ENTRY INDEX]
[UNKNOWN_1]
[EXTERNALS]
# HEADER - BIGENDIAN (48 bytes)
------ 8 bytes of padding -------
version 4 bytes
------ 4 bytes of padding -------
endianness 1 byte // 00 means little endian
------ 3 bytes of padding -------
metadata 4 bytes
filesize 8 bytes
data offset 8 bytes
------ 8 bytes of padding -------
# UNITY_VERSION - UTF-8 HAS NO ENDIANNESS. THANKS LARA.
string until null byte
# HEADER TAIL - DEPENDS ON `endianness` FROM HEADER. 0 is little endian
target platform 4 bytes
type tree enabled 1 bytes // boolean
# ASSET TYPES - DEPENDS ON `endianness` FROM HEADER. 0 is little endian
count 4 bytes
[asset-type 1]
[asset-type 2]
...
[asset-type count]
asset-type:
class id 4 bytes
is stripped 1 byte // boolean
script type index 2 bytes
if class id == 114:
script id 16 bytes
endif
old type hash 16 bytes
# ASSET INDEX - DEPENDS ON `endianness` FROM HEADER. 0 is little endian
count 4 bytes
--- pad to align with 4 bytes ---
[entry 1] 24 bytes
[entry 2] 24 bytes
... each 24 bytes
[entry count] 24 bytes
entry:
path id 8 bytes
offset 8 bytes // the actual offset will be
// this + data_offset from header
size 4 bytes
asset type index 4 bytes
# UNKNOWN_1 - DEPENDS ON `endianness` FROM HEADER. 0 is little endian
count 4 bytes
[unknown1 1] 12 bytes
[unknown1 2] 12 bytes
... each 12 bytes
[unknown1 count] 12 bytes
unknown1:
unknown 4 bytes
unknown 8 bytes
# EXTERNALS - DEPENDS ON `endianness` FROM HEADER. 0 is little endian
count 4 bytes
[external 1] unknown bytes
[external 2] unknown bytes
... each unknown bytes
[external count] unknown bytes
external:
------- 1 byte of padding -------
guid 16 bytes
type 4 bytes
path string to null