How can I hook c# fields with Theos

274 Views Asked by At

I am trying to use theos to hook some class variables values in ios game. This game is built with unity so I used il2cppdumper to dump classes, methods, and fields for the game. The problem is the output syntax for il2cppdumper is c#. I don't know much c# but it uses a different type of data called "fields". Fields in c# are different from properties in objective c. I want to hook the getter or the setter of a field so I can change its value. How can I do that?

1

There are 1 best solutions below

0
Enes Sadık Özbek On

In C# you can not hook fields, since they are read and written directly. C# has properties with getters and setters but they are a different member type.