Closed broqdev closed 1 year ago
Hi, here you are:
Il2Cpp.array(Il2Cpp.corlib.class("System.Object"), [ ... ]);
Beware of you can only pass Il2Cpp.Object
s.
Full example:
const SystemInt32 = Il2Cpp.corlib.class("System.Int32");
const SystemObject = Il2Cpp.corlib.class("System.Object");
const zeroBoxed = SystemInt32.new();
zeroBoxed.m_value.value = 0;
const oneBoxed = SystemInt32.new();
oneBoxed.m_value.value = 1;
const test = Il2Cpp.string("test");
CallStatic.invoke(Il2Cpp.string("MyMethod"), Il2Cpp.array(SystemObject, [zeroBoxed, oneBoxed, test]));
verified it works. Thanks!
Hey, first great tool. Thank you for the work!
I'm trying to invoke https://docs.unity3d.com/ScriptReference/AndroidJavaObject.CallStatic.html , which is
I have successfully done that by using a empty System.Object[] object. But when I try to do something like
I cannot find a proper way to do that. I have tried Il2Cpp.Array.array, or System.Object[].ctor. But all got errors. Could you please help to show some way for doing that?