Class IL2CPPDetourMethodPatcher

Inheritance
System.Object IL2CPPDetourMethodPatcher
Namespace: BepInEx.IL2CPP.Hook
Assembly: BepInEx.IL2CPP.dll
Syntax
public class IL2CPPDetourMethodPatcher : MethodPatcher

Constructors

IL2CPPDetourMethodPatcher(MethodBase)

Constructs a new instance of method patcher.

Declaration
public IL2CPPDetourMethodPatcher(MethodBase original)
Parameters
Type Name Description
System.Reflection.MethodBase original

Methods

CopyOriginal()

Declaration
public override DynamicMethodDefinition CopyOriginal()
Returns
Type Description
DynamicMethodDefinition

DetourTo(MethodBase)

Declaration
public override MethodBase DetourTo(MethodBase replacement)
Parameters
Type Name Description
System.Reflection.MethodBase replacement
Returns
Type Description
System.Reflection.MethodBase

PrepareOriginal()

Declaration
public override DynamicMethodDefinition PrepareOriginal()
Returns
Type Description
DynamicMethodDefinition

TryResolve(Object, PatchManager.PatcherResolverEventArgs)

A handler for that checks if a method doesn't have a body (e.g. it's icall or marked with ) and thus can be patched with .

Declaration
public static void TryResolve(object sender, PatchManager.PatcherResolverEventArgs args)
Parameters
Type Name Description
System.Object sender

Not used

PatchManager.PatcherResolverEventArgs args

Patch resolver arguments