Closed commonuserlol closed 10 months ago
For that case you need to somehow get the Il2Cpp.Class
of the the type then inflate it, and invoke the method.
If you have an Il2Cpp.Object
then you can get the class that way or you could simply find the class in the assembly.
wdym? I need get type of class, to pass to method (for example: UnityEngine.Component GetComponent(System.Type type);
)
const klass: Il2Cpp.Class = ...
const managedType: Il2Cpp.Object = klass.type.object; // a System.Type
There's method which consumes
System.Type
as argument, when in 'normal' C# it looks likeCan i somehow invoke typeof operator? (Yes there's another overload with
T method();
and i still remember how to work with it, but i'm interested in typeof)