mirror of
https://github.com/sinai-dev/UnityExplorer.git
synced 2025-06-16 22:27:45 +08:00
Update HookInstance.cs
This commit is contained in:
parent
1e1fb0e27b
commit
fad5fe0620
@ -47,6 +47,19 @@ namespace UnityExplorer.Hooks
|
|||||||
Patch();
|
Patch();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public HookInstance(MethodInfo targetMethod, string code)
|
||||||
|
{
|
||||||
|
this.TargetMethod = targetMethod;
|
||||||
|
this.signature = TargetMethod.FullDescription();
|
||||||
|
|
||||||
|
PatchSourceCode = code;
|
||||||
|
|
||||||
|
if (CompileAndGenerateProcessor(PatchSourceCode))
|
||||||
|
{
|
||||||
|
Patch();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Evaluator.source_file
|
// Evaluator.source_file
|
||||||
private static readonly FieldInfo fi_sourceFile = AccessTools.Field(typeof(Evaluator), "source_file");
|
private static readonly FieldInfo fi_sourceFile = AccessTools.Field(typeof(Evaluator), "source_file");
|
||||||
// TypeDefinition.Definition
|
// TypeDefinition.Definition
|
||||||
|
Loading…
x
Reference in New Issue
Block a user