소스 검색

Add unhollowed assemblies as preloader patcher targets

Bepis 3 년 전
부모
커밋
65512173ff
1개의 변경된 파일14개의 추가작업 그리고 0개의 파일을 삭제
  1. 14 0
      BepInEx.IL2CPP/Preloader.cs

+ 14 - 0
BepInEx.IL2CPP/Preloader.cs

@@ -55,6 +55,20 @@ namespace BepInEx.IL2CPP
 					ProxyAssemblyGenerator.GenerateAssemblies();
 
 
+				using (var assemblyPatcher = new AssemblyPatcher())
+				{
+					assemblyPatcher.AddPatchersFromDirectory(Paths.PatcherPluginPath);
+
+					Log.LogInfo($"{assemblyPatcher.PatcherPlugins.Count} patcher plugin{(assemblyPatcher.PatcherPlugins.Count == 1 ? "" : "s")} loaded");
+
+					assemblyPatcher.LoadAssemblyDirectory(IL2CPPUnhollowedPath);
+
+					Log.LogInfo($"{assemblyPatcher.PatcherPlugins.Count} assemblies discovered");
+					
+					assemblyPatcher.PatchAndLoad();
+				}
+
+
 				Logger.Listeners.Remove(PreloaderLog);