Call from Il2Cpp.Class with instance argument
commonuserlol opened this issue · comments
I have a method which was found in Il2Cpp.Class
(e.g. object.class.methods.find(_ => _.name == "name" && _.isGeneric)!.inflate(klass)
). How i can invoke it with 1st argument as instance like .invoke(object)
but it throws error, so my temp solution is:
//@ts-ignore
.invokeRaw(object) as Il2Cpp.Object;
.withHolder(object).invoke()
Either is fine 😄
.withHolder(object).invoke()
withHolder is internal so i have to disable linter like with .invokeRaw (ts-ignore)
Okay i just replaced finding generic method to object.method<Il2Cpp.Object>("GetComponent").overload("System.Type").invoke(klass.type.object);