-
Notifications
You must be signed in to change notification settings - Fork 0
/
UnityTypes.h
283 lines (258 loc) · 6.73 KB
/
UnityTypes.h
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
#pragma once
typedef int32_t TypeDefinitionIndex;
typedef int32_t CustomAttributeIndex;
typedef int32_t MethodIndex;
struct Il2CppAssembly;
typedef struct Il2CppDomain
{
void* domain;
void* setup;
void* default_context;
const char* friendly_name;
uint32_t domain_id;
#if NET_4_0
volatile int threadpool_jobs;
#endif
void* agent_info;
} Il2CppDomain;
typedef struct Il2CppAssemblyName
{
const char* name;
const char* culture;
const char* hash_value;
const char* public_key;
uint32_t hash_alg;
int32_t hash_len;
uint32_t flags;
int32_t major;
int32_t minor;
int32_t build;
int32_t revision;
uint8_t public_key_token[/*PUBLIC_KEY_BYTE_LENGTH*/64];
} Il2CppAssemblyName;
typedef struct Il2CppImage
{
const char* name;
const char* nameNoExt;
Il2CppAssembly* assembly;
TypeDefinitionIndex typeStart;
uint32_t typeCount;
TypeDefinitionIndex exportedTypeStart;
uint32_t exportedTypeCount;
CustomAttributeIndex customAttributeStart;
uint32_t customAttributeCount;
MethodIndex entryPointIndex;
#ifdef __cplusplus
mutable
#endif
void* nameToClassHashTable;
uint32_t token;
uint8_t dynamic;
} Il2CppImage;
typedef struct Il2CppAssembly
{
Il2CppImage* image;
uint32_t token;
int32_t referencedAssemblyStart;
int32_t referencedAssemblyCount;
Il2CppAssemblyName aname;
} Il2CppAssembly;
typedef void(*Il2CppMethodPointer)();
struct MethodInfo;
struct VirtualInvokeData
{
Il2CppMethodPointer methodPtr;
const MethodInfo* method;
};
struct Il2CppType
{
void* data;
unsigned int bits;
};
struct Il2CppClass;
struct Il2CppObject
{
Il2CppClass* klass;
void* monitor;
};
union Il2CppRGCTXData
{
void* rgctxDataDummy;
const MethodInfo* method;
const Il2CppType* type;
Il2CppClass* klass;
};
struct Il2CppRuntimeInterfaceOffsetPair
{
Il2CppClass* interfaceType;
int32_t offset;
};
struct Il2CppClass_1
{
void* image;
void* gc_desc;
const char* name;
const char* namespaze;
Il2CppType byval_arg;
Il2CppType this_arg;
Il2CppClass* element_class;
Il2CppClass* castClass;
Il2CppClass* declaringType;
Il2CppClass* parent;
void* generic_class;
void* typeDefinition;
void* interopData;
Il2CppClass* klass;
void* fields;
void* events;
void* properties;
void* methods;
Il2CppClass** nestedTypes;
Il2CppClass** implementedInterfaces;
Il2CppRuntimeInterfaceOffsetPair* interfaceOffsets;
};
struct Il2CppClass_2
{
Il2CppClass** typeHierarchy;
uint32_t initializationExceptionGCHandle;
uint32_t cctor_started;
uint32_t cctor_finished;
uint64_t cctor_thread;
int32_t genericContainerIndex;
uint32_t instance_size;
uint32_t actualSize;
uint32_t element_size;
int32_t native_size;
uint32_t static_fields_size;
uint32_t thread_static_fields_size;
int32_t thread_static_fields_offset;
uint32_t flags;
uint32_t token;
uint16_t method_count;
uint16_t property_count;
uint16_t field_count;
uint16_t event_count;
uint16_t nested_type_count;
uint16_t vtable_count;
uint16_t interfaces_count;
uint16_t interface_offsets_count;
uint8_t typeHierarchyDepth;
uint8_t genericRecursionDepth;
uint8_t rank;
uint8_t minimumAlignment;
uint8_t naturalAligment;
uint8_t packingSize;
uint8_t bitflags1;
uint8_t bitflags2;
};
struct Il2CppClass
{
Il2CppClass_1 _1;
void* static_fields;
Il2CppRGCTXData* rgctx_data;
Il2CppClass_2 _2;
VirtualInvokeData vtable[255];
};
typedef uintptr_t il2cpp_array_size_t;
typedef int32_t il2cpp_array_lower_bound_t;
struct Il2CppArrayBounds
{
il2cpp_array_size_t length;
il2cpp_array_lower_bound_t lower_bound;
};
struct MethodInfo
{
Il2CppMethodPointer methodPointer;
void* invoker_method;
const char* name;
Il2CppClass* klass;
const Il2CppType* return_type;
const void* parameters;
union
{
const Il2CppRGCTXData* rgctx_data;
const void* methodDefinition;
};
union
{
const void* genericMethod;
const void* genericContainer;
};
uint32_t token;
uint16_t flags;
uint16_t iflags;
uint16_t slot;
uint8_t parameters_count;
uint8_t bitflags;
};
struct __declspec(align(8)) UnityEngine_Object_Fields {
intptr_t m_CachedPtr;
};
struct UnityEngine_GameObject_Fields : UnityEngine_Object_Fields {
};
struct UnityEngine_GameObject_VTable {
VirtualInvokeData _0_Equals;
VirtualInvokeData _1_Finalize;
VirtualInvokeData _2_GetHashCode;
VirtualInvokeData _3_ToString;
};
struct UnityEngine_GameObject_c {
Il2CppClass_1 _1;
void* static_fields;
Il2CppRGCTXData* rgctx_data;
Il2CppClass_2 _2;
UnityEngine_GameObject_VTable vtable;
};
struct UnityEngine_GameObject_o {
UnityEngine_GameObject_c* klass;
void* monitor;
UnityEngine_GameObject_Fields fields;
};
struct __declspec(align(8)) System_String_Fields {
int32_t m_stringLength;
uint16_t m_firstChar;
};
struct System_String_VTable {
VirtualInvokeData _0_Equals;
VirtualInvokeData _1_Finalize;
VirtualInvokeData _2_GetHashCode;
VirtualInvokeData _3_ToString;
VirtualInvokeData _4_CompareTo;
VirtualInvokeData _5_Clone;
VirtualInvokeData _6_GetTypeCode;
VirtualInvokeData _7_System_IConvertible_ToBoolean;
VirtualInvokeData _8_System_IConvertible_ToChar;
VirtualInvokeData _9_System_IConvertible_ToSByte;
VirtualInvokeData _10_System_IConvertible_ToByte;
VirtualInvokeData _11_System_IConvertible_ToInt16;
VirtualInvokeData _12_System_IConvertible_ToUInt16;
VirtualInvokeData _13_System_IConvertible_ToInt32;
VirtualInvokeData _14_System_IConvertible_ToUInt32;
VirtualInvokeData _15_System_IConvertible_ToInt64;
VirtualInvokeData _16_System_IConvertible_ToUInt64;
VirtualInvokeData _17_System_IConvertible_ToSingle;
VirtualInvokeData _18_System_IConvertible_ToDouble;
VirtualInvokeData _19_System_IConvertible_ToDecimal;
VirtualInvokeData _20_System_IConvertible_ToDateTime;
VirtualInvokeData _21_ToString;
VirtualInvokeData _22_System_IConvertible_ToType;
VirtualInvokeData _23_System_Collections_IEnumerable_GetEnumerator;
VirtualInvokeData _24_CompareTo;
VirtualInvokeData _25_System_Collections_Generic_IEnumerable_System_Char__GetEnumerator;
VirtualInvokeData _26_Equals;
};
struct System_String_c {
Il2CppClass_1 _1;
struct System_String_StaticFields* static_fields;
Il2CppRGCTXData* rgctx_data;
Il2CppClass_2 _2;
System_String_VTable vtable;
};
struct System_String_o {
System_String_c* klass;
void* monitor;
System_String_Fields fields;
};
struct System_String_StaticFields {
struct System_String_o* Empty;
};