How to get the memory address of ValueType fields #189
Unanswered
SamueleD78
asked this question in
Q&A
Replies: 1 comment
-
Here I calculate the handle. If the field is static, there isn't a clear way to do so. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
As in the title, i need to recover the memory address of a field in a struct.
Let's say my code it's this one:
If i
console.log(tmp)
, i have the struct base address.Now, let's suppose the struct has a field
index
. I usually recover the value this way:But what if want to recover the address that field has in memory?
i tried with
console.log(inst.field<Il2Cpp.ValueType>("index").handle)
but of course it's wrong.since it's the first element of the structure, the address should be the same as
tmp
.Of course this example it's simple, i know i could just dump tmp. What i need it's to recover the address accessing from the
.field()
functions.Is there a way?
Beta Was this translation helpful? Give feedback.
All reactions