Skip to content

Is there any way to access data of list generics ? #592

Answered by vfsfitvnm
IceBear1226 asked this question in Q&A
Discussion options

You must be logged in to vote

The value returned by invoke is indeed the actual value (e.g. you can console.log it) - Il2Cpp.Method.ReturnType is just an union of all the possible types a method invocation can return (e.g. void, number, Il2Cpp.Object...).

Il2Cpp.Method takes a generic type argument, so that you can specify the return type of that method, e.g:

const method = object.method<Il2Cpp.Object>("foo");
const value = method.invoke(); // value is Il2Cpp.Object

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@vfsfitvnm
Comment options

Answer selected by IceBear1226
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants