diff --git a/src/ExplorerCore.cs b/src/ExplorerCore.cs index 9d9eb23..3e0ca98 100644 --- a/src/ExplorerCore.cs +++ b/src/ExplorerCore.cs @@ -18,7 +18,7 @@ namespace UnityExplorer public static class ExplorerCore { public const string NAME = "UnityExplorer"; - public const string VERSION = "4.5.7"; + public const string VERSION = "4.5.8"; public const string AUTHOR = "Sinai"; public const string GUID = "com.sinai.unityexplorer"; diff --git a/src/Tests/TestClass.cs b/src/Tests/TestClass.cs index 009be6a..51d69ce 100644 --- a/src/Tests/TestClass.cs +++ b/src/Tests/TestClass.cs @@ -146,17 +146,17 @@ namespace UnityExplorer.Tests } #if CPP + public static Il2CppSystem.Collections.Generic.Dictionary IL2CPP_Dict; + public static Il2CppSystem.Collections.Generic.HashSet IL2CPP_HashSet; public static Il2CppSystem.Collections.Generic.List IL2CPP_ListString; + public static Il2CppSystem.Collections.Hashtable IL2CPP_HashTable; public static List IL2CPP_listOfBoxedObjects; public static Il2CppStructArray IL2CPP_structArray; public static Il2CppReferenceArray IL2CPP_ReferenceArray; public static Il2CppSystem.Collections.IDictionary IL2CPP_IDict; public static Il2CppSystem.Collections.IList IL2CPP_IList; public static Dictionary IL2CPP_BoxedDict; - - public static Il2CppSystem.Collections.Generic.HashSet IL2CPP_HashSet; - public static Il2CppSystem.Collections.Generic.Dictionary IL2CPP_Dict; - public static Il2CppSystem.Collections.Hashtable IL2CPP_HashTable; + public static Il2CppSystem.Object IL2CPP_BoxedInt; public static Il2CppSystem.Int32 IL2CPP_Int; public static Il2CppSystem.Decimal IL2CPP_Decimal; @@ -175,40 +175,41 @@ namespace UnityExplorer.Tests IL2CPP_Dict.Add("key2", "value2"); IL2CPP_Dict.Add("key3", "value3"); - ExplorerCore.Log($"IL2CPP 2: Il2Cpp Hashtable"); - IL2CPP_HashTable = new Il2CppSystem.Collections.Hashtable(); - IL2CPP_HashTable.Add("key1", "value1"); - IL2CPP_HashTable.Add("key2", "value2"); - IL2CPP_HashTable.Add("key3", "value3"); - - ExplorerCore.Log($"IL2CPP 3: Il2Cpp IDictionary"); - var dict2 = new Il2CppSystem.Collections.Generic.Dictionary(); - dict2.Add("key1", "value1"); - IL2CPP_IDict = dict2.TryCast(); - - ExplorerCore.Log($"IL2CPP 4: Il2Cpp List of Il2Cpp Object"); - var list = new Il2CppSystem.Collections.Generic.List(5); - list.Add("one"); - list.Add("two"); - IL2CPP_IList = list.TryCast(); - - ExplorerCore.Log($"IL2CPP 5: Il2Cpp List of strings"); - IL2CPP_ListString = new Il2CppSystem.Collections.Generic.List(); - IL2CPP_ListString.Add("hello,"); - IL2CPP_ListString.Add("world!"); - ExplorerCore.Log($"IL2CPP 6: Il2Cpp HashSet of strings"); IL2CPP_HashSet = new Il2CppSystem.Collections.Generic.HashSet(); IL2CPP_HashSet.Add("one"); IL2CPP_HashSet.Add("two"); + ExplorerCore.Log($"IL2CPP 2: Il2Cpp Hashtable"); + IL2CPP_HashTable = new Il2CppSystem.Collections.Hashtable(); + IL2CPP_HashTable.Add("key1", "value1"); + IL2CPP_HashTable.Add("key2", "value2"); + IL2CPP_HashTable.Add("key3", "value3"); + + ExplorerCore.Log($"IL2CPP 3: Il2Cpp IDictionary"); + var dict2 = new Il2CppSystem.Collections.Generic.Dictionary(); + dict2.Add("key1", "value1"); + IL2CPP_IDict = dict2.TryCast(); + + ExplorerCore.Log($"IL2CPP 4: Il2Cpp List of Il2Cpp Object"); + var list = new Il2CppSystem.Collections.Generic.List(5); + list.Add("one"); + list.Add("two"); + IL2CPP_IList = list.TryCast(); + + ExplorerCore.Log($"IL2CPP 5: Il2Cpp List of strings"); + IL2CPP_ListString = new Il2CppSystem.Collections.Generic.List(); + IL2CPP_ListString.Add("hello,"); + IL2CPP_ListString.Add("world!"); + + ExplorerCore.Log($"IL2CPP 7: Dictionary of Il2Cpp String and Il2Cpp Object"); IL2CPP_BoxedDict = new(); IL2CPP_BoxedDict[(Il2CppSystem.String)"one"] = new Il2CppSystem.Int32 { m_value = 1 }.BoxIl2CppObject(); IL2CPP_BoxedDict[(Il2CppSystem.String)"two"] = new Il2CppSystem.Int32 { m_value = 2 }.BoxIl2CppObject(); IL2CPP_BoxedDict[(Il2CppSystem.String)"three"] = new Il2CppSystem.Int32 { m_value = 3 }.BoxIl2CppObject(); IL2CPP_BoxedDict[(Il2CppSystem.String)"four"] = new Il2CppSystem.Int32 { m_value = 4 }.BoxIl2CppObject(); - + ExplorerCore.Log($"IL2CPP 8: List of boxed Il2Cpp Objects"); IL2CPP_listOfBoxedObjects = new List(); IL2CPP_listOfBoxedObjects.Add((Il2CppSystem.String)"boxedString"); @@ -223,16 +224,16 @@ namespace UnityExplorer.Tests var boxedEnum = Il2CppSystem.Enum.Parse(cppType, "Color"); IL2CPP_listOfBoxedObjects.Add(boxedEnum); } - + var structBox = Vector3.one.BoxIl2CppObject(); IL2CPP_listOfBoxedObjects.Add(structBox); - + } catch (Exception ex) { ExplorerCore.LogWarning($"Boxed enum test fail: {ex}"); } - + ExplorerCore.Log($"IL2CPP 9: Il2Cpp struct array of ints"); IL2CPP_structArray = new UnhollowerBaseLib.Il2CppStructArray(5); IL2CPP_structArray[0] = 0; @@ -240,13 +241,13 @@ namespace UnityExplorer.Tests IL2CPP_structArray[2] = 2; IL2CPP_structArray[3] = 3; IL2CPP_structArray[4] = 4; - + ExplorerCore.Log($"IL2CPP 10: Il2Cpp reference array of boxed objects"); IL2CPP_ReferenceArray = new UnhollowerBaseLib.Il2CppReferenceArray(3); IL2CPP_ReferenceArray[0] = new Il2CppSystem.Int32 { m_value = 5 }.BoxIl2CppObject(); IL2CPP_ReferenceArray[1] = null; IL2CPP_ReferenceArray[2] = (Il2CppSystem.String)"whats up"; - + ExplorerCore.Log($"IL2CPP 11: Misc il2cpp members"); IL2CPP_BoxedInt = new Il2CppSystem.Int32() { m_value = 5 }.BoxIl2CppObject(); IL2CPP_Int = new Il2CppSystem.Int32 { m_value = 420 }; diff --git a/src/UnityExplorer.csproj b/src/UnityExplorer.csproj index 1814bd1..9dc2118 100644 --- a/src/UnityExplorer.csproj +++ b/src/UnityExplorer.csproj @@ -175,13 +175,13 @@ False - packages\UniverseLib.1.2.9\lib\net35\UniverseLib.Mono.dll + packages\UniverseLib.1.2.10\lib\net35\UniverseLib.Mono.dll - packages\UniverseLib.1.2.9\lib\net472\UniverseLib.IL2CPP.dll + packages\UniverseLib.1.2.10\lib\net472\UniverseLib.IL2CPP.dll packages\Il2CppAssemblyUnhollower.BaseLib.0.4.22\lib\net472\UnhollowerBaseLib.dll diff --git a/src/packages.config b/src/packages.config index dc6c85b..12254ff 100644 --- a/src/packages.config +++ b/src/packages.config @@ -6,6 +6,6 @@ - + \ No newline at end of file