Skip to content

Commit

Permalink
fix incorrect type in MonoMod Examples (#117)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hamunii authored May 16, 2024
1 parent ebef060 commit 88669b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/dev/fundamentals/patching-code/monomod-examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ private static void Transform_set_position(ILContext il)
// Emit a call to our own method named PrintPosition in class MyPatches,
// which takes a (valuetype UnityEngine.Vector3&) by reference as argument,
// because ldarga.s loads the address of 'value' onto stack
c.Emit(OpCodes.Call, AccessTools.DeclaredMethod(typeof(LogPlayerPosition), nameof(PrintPosition)));
c.Emit(OpCodes.Call, AccessTools.DeclaredMethod(typeof(MyPatches), nameof(PrintPosition)));

// The following IL code is after us:
// IL_0003: call instance void UnityEngine.Transform::set_position_Injected(valuetype UnityEngine.Vector3&)
Expand Down

0 comments on commit 88669b6

Please sign in to comment.