@@ -146,17 +146,17 @@ private static void Init_Mono()
146
146
}
147
147
148
148
#if CPP
149
+ public static Il2CppSystem . Collections . Generic . Dictionary < string , string > IL2CPP_Dict ;
150
+ public static Il2CppSystem . Collections . Generic . HashSet < string > IL2CPP_HashSet ;
149
151
public static Il2CppSystem . Collections . Generic . List < string > IL2CPP_ListString ;
152
+ public static Il2CppSystem . Collections . Hashtable IL2CPP_HashTable ;
150
153
public static List < Il2CppSystem . Object > IL2CPP_listOfBoxedObjects ;
151
154
public static Il2CppStructArray < int > IL2CPP_structArray ;
152
155
public static Il2CppReferenceArray < Il2CppSystem . Object > IL2CPP_ReferenceArray ;
153
156
public static Il2CppSystem . Collections . IDictionary IL2CPP_IDict ;
154
157
public static Il2CppSystem . Collections . IList IL2CPP_IList ;
155
158
public static Dictionary < Il2CppSystem . Object , Il2CppSystem . Object > IL2CPP_BoxedDict ;
156
-
157
- public static Il2CppSystem . Collections . Generic . HashSet < string > IL2CPP_HashSet ;
158
- public static Il2CppSystem . Collections . Generic . Dictionary < string , string > IL2CPP_Dict ;
159
- public static Il2CppSystem . Collections . Hashtable IL2CPP_HashTable ;
159
+
160
160
public static Il2CppSystem . Object IL2CPP_BoxedInt ;
161
161
public static Il2CppSystem . Int32 IL2CPP_Int ;
162
162
public static Il2CppSystem . Decimal IL2CPP_Decimal ;
@@ -175,40 +175,41 @@ private static void Init_IL2CPP()
175
175
IL2CPP_Dict . Add ( "key2" , "value2" ) ;
176
176
IL2CPP_Dict . Add ( "key3" , "value3" ) ;
177
177
178
+ ExplorerCore . Log ( $ "IL2CPP 6: Il2Cpp HashSet of strings") ;
179
+ IL2CPP_HashSet = new Il2CppSystem . Collections . Generic . HashSet < string > ( ) ;
180
+ IL2CPP_HashSet . Add ( "one" ) ;
181
+ IL2CPP_HashSet . Add ( "two" ) ;
182
+
178
183
ExplorerCore . Log ( $ "IL2CPP 2: Il2Cpp Hashtable") ;
179
184
IL2CPP_HashTable = new Il2CppSystem . Collections . Hashtable ( ) ;
180
185
IL2CPP_HashTable . Add ( "key1" , "value1" ) ;
181
186
IL2CPP_HashTable . Add ( "key2" , "value2" ) ;
182
187
IL2CPP_HashTable . Add ( "key3" , "value3" ) ;
183
-
188
+
184
189
ExplorerCore . Log ( $ "IL2CPP 3: Il2Cpp IDictionary") ;
185
190
var dict2 = new Il2CppSystem . Collections . Generic . Dictionary < string , string > ( ) ;
186
191
dict2 . Add ( "key1" , "value1" ) ;
187
192
IL2CPP_IDict = dict2 . TryCast < Il2CppSystem . Collections . IDictionary > ( ) ;
188
-
193
+
189
194
ExplorerCore . Log ( $ "IL2CPP 4: Il2Cpp List of Il2Cpp Object") ;
190
195
var list = new Il2CppSystem . Collections . Generic . List < Il2CppSystem . Object > ( 5 ) ;
191
196
list . Add ( "one" ) ;
192
197
list . Add ( "two" ) ;
193
198
IL2CPP_IList = list . TryCast < Il2CppSystem . Collections . IList > ( ) ;
194
-
199
+
195
200
ExplorerCore . Log ( $ "IL2CPP 5: Il2Cpp List of strings") ;
196
201
IL2CPP_ListString = new Il2CppSystem . Collections . Generic . List < string > ( ) ;
197
202
IL2CPP_ListString . Add ( "hello," ) ;
198
203
IL2CPP_ListString . Add ( "world!" ) ;
199
-
200
- ExplorerCore . Log ( $ "IL2CPP 6: Il2Cpp HashSet of strings") ;
201
- IL2CPP_HashSet = new Il2CppSystem . Collections . Generic . HashSet < string > ( ) ;
202
- IL2CPP_HashSet . Add ( "one" ) ;
203
- IL2CPP_HashSet . Add ( "two" ) ;
204
-
204
+
205
+
205
206
ExplorerCore . Log ( $ "IL2CPP 7: Dictionary of Il2Cpp String and Il2Cpp Object") ;
206
207
IL2CPP_BoxedDict = new ( ) ;
207
208
IL2CPP_BoxedDict [ ( Il2CppSystem . String ) "one" ] = new Il2CppSystem . Int32 { m_value = 1 } . BoxIl2CppObject ( ) ;
208
209
IL2CPP_BoxedDict [ ( Il2CppSystem . String ) "two" ] = new Il2CppSystem . Int32 { m_value = 2 } . BoxIl2CppObject ( ) ;
209
210
IL2CPP_BoxedDict [ ( Il2CppSystem . String ) "three" ] = new Il2CppSystem . Int32 { m_value = 3 } . BoxIl2CppObject ( ) ;
210
211
IL2CPP_BoxedDict [ ( Il2CppSystem . String ) "four" ] = new Il2CppSystem . Int32 { m_value = 4 } . BoxIl2CppObject ( ) ;
211
-
212
+
212
213
ExplorerCore . Log ( $ "IL2CPP 8: List of boxed Il2Cpp Objects") ;
213
214
IL2CPP_listOfBoxedObjects = new List < Il2CppSystem . Object > ( ) ;
214
215
IL2CPP_listOfBoxedObjects . Add ( ( Il2CppSystem . String ) "boxedString" ) ;
@@ -223,30 +224,30 @@ private static void Init_IL2CPP()
223
224
var boxedEnum = Il2CppSystem . Enum . Parse ( cppType , "Color" ) ;
224
225
IL2CPP_listOfBoxedObjects . Add ( boxedEnum ) ;
225
226
}
226
-
227
+
227
228
var structBox = Vector3 . one . BoxIl2CppObject ( ) ;
228
229
IL2CPP_listOfBoxedObjects . Add ( structBox ) ;
229
-
230
+
230
231
}
231
232
catch ( Exception ex )
232
233
{
233
234
ExplorerCore . LogWarning ( $ "Boxed enum test fail: { ex } ") ;
234
235
}
235
-
236
+
236
237
ExplorerCore . Log ( $ "IL2CPP 9: Il2Cpp struct array of ints") ;
237
238
IL2CPP_structArray = new UnhollowerBaseLib . Il2CppStructArray < int > ( 5 ) ;
238
239
IL2CPP_structArray [ 0 ] = 0 ;
239
240
IL2CPP_structArray [ 1 ] = 1 ;
240
241
IL2CPP_structArray [ 2 ] = 2 ;
241
242
IL2CPP_structArray [ 3 ] = 3 ;
242
243
IL2CPP_structArray [ 4 ] = 4 ;
243
-
244
+
244
245
ExplorerCore . Log ( $ "IL2CPP 10: Il2Cpp reference array of boxed objects") ;
245
246
IL2CPP_ReferenceArray = new UnhollowerBaseLib . Il2CppReferenceArray < Il2CppSystem . Object > ( 3 ) ;
246
247
IL2CPP_ReferenceArray [ 0 ] = new Il2CppSystem . Int32 { m_value = 5 } . BoxIl2CppObject ( ) ;
247
248
IL2CPP_ReferenceArray [ 1 ] = null ;
248
249
IL2CPP_ReferenceArray [ 2 ] = ( Il2CppSystem . String ) "whats up" ;
249
-
250
+
250
251
ExplorerCore . Log ( $ "IL2CPP 11: Misc il2cpp members") ;
251
252
IL2CPP_BoxedInt = new Il2CppSystem . Int32 ( ) { m_value = 5 } . BoxIl2CppObject ( ) ;
252
253
IL2CPP_Int = new Il2CppSystem . Int32 { m_value = 420 } ;
0 commit comments