Files
BepInEx/BepInEx.NetLauncher/RuntimeFixes/AssemblyFix.cs
T
Bepis f737a3e53c First doorstop prototype integration
Code is messy, please do not bully
2020-08-31 19:01:45 +10:00

24 lines
579 B
C#

using System.Reflection;
using BepInEx.Harmony;
using HarmonyLib;
namespace BepInEx.NetLauncher.RuntimeFixes
{
internal class AssemblyFix
{
private static Assembly EntryAssembly { get; set; }
public static void Execute(Assembly entryAssembly)
{
EntryAssembly = entryAssembly;
HarmonyWrapper.PatchAll(typeof(AssemblyFix), "bepinex.assemblyfix");
}
[HarmonyPrefix, HarmonyPatch(typeof(Assembly), nameof(Assembly.GetEntryAssembly))]
public static bool GetEntryAssemblyPrefix(ref Assembly __result)
{
__result = EntryAssembly;
return false;
}
}
}