pardeike / Harmony

A library for patching, replacing and decorating .NET and Mono methods during runtime
https://www.patreon.com/pardeike
MIT License
5.15k stars 485 forks source link

How do i change valuetype #608

Closed Arales03482 closed 1 month ago

Arales03482 commented 4 months ago

I would like to know how to edit the valuetype in a transpiler patch

image

I want to edit the 1311IL instruction to a different function

pardeike commented 1 month ago

You modify the CodeInstruction at that point before you emit it. There are plenty of examples of transpilers when you search Github for transpiler C# code. I recommend to check out the official discord for more help.