Linker.cs 425 B

12345678910111213141516171819
  1. using System.Diagnostics;
  2. using System.Reflection;
  3. namespace BepInEx.Bootstrap
  4. {
  5. public static class Linker
  6. {
  7. public static void StartBepInEx()
  8. {
  9. var property = typeof(Paths)
  10. .GetProperty("ExecutablePath", BindingFlags.Static | BindingFlags.Public)
  11. ?.GetSetMethod(true);
  12. property?.Invoke(null, new object[] {Process.GetCurrentProcess().MainModule.FileName});
  13. Chainloader.Initialize();
  14. }
  15. }
  16. }