Starting BTD Modding
Prerequisites
@@ -39,4 +39,4 @@
Reflection
If you want to do Reflection with Il2CppSystem Objects, then the main difference is that you need to use the GetIl2CppType()
method instead of the GetType()
method.
If you ever find yourself with an Il2CppSystem.Object
that you know to be a primitive type like an integer, you won't be able to just (cast) or even .Cast<>()
it. You'll have to "Unbox" it via object.Unbox<int>()
.
-
Similarly, if you have a primitive type that needs to be converted to an IL2CPP object, you'll have to "Box" it by doing new Int32 {m_value = integer}.BoxIl2CppObject();