diff --git a/IPA.Injector/Injector.cs b/IPA.Injector/Injector.cs index 52404fd1..ecefca57 100644 --- a/IPA.Injector/Injector.cs +++ b/IPA.Injector/Injector.cs @@ -96,7 +96,7 @@ namespace IPA.Injector GameVersionEarly.Load(); - HarmonyProtector.Protect(); + InstallHarmonyProtections(); pluginAsyncLoadTask = PluginLoader.LoadTask(); permissionFixTask = PermissionFix.FixPermissions(new DirectoryInfo(Environment.CurrentDirectory)); @@ -104,6 +104,7 @@ namespace IPA.Injector catch (Exception e) { Console.WriteLine(e); + throw; } } @@ -123,6 +124,11 @@ namespace IPA.Injector LibLoader.Configure(); } + private static void InstallHarmonyProtections() + { // proxy function to delay resolution + HarmonyProtector.Protect(); + } + private static void InstallBootstrapPatch() { var cAsmName = Assembly.GetExecutingAssembly().GetName(); diff --git a/IPA.Loader/Loader/LibLoader.cs b/IPA.Loader/Loader/LibLoader.cs index 01b23a3d..ea565220 100644 --- a/IPA.Loader/Loader/LibLoader.cs +++ b/IPA.Loader/Loader/LibLoader.cs @@ -47,9 +47,9 @@ namespace IPA.Loader internal static void Configure() { + SetupAssemblyFilenames(true); AppDomain.CurrentDomain.AssemblyResolve -= AssemblyLibLoader; AppDomain.CurrentDomain.AssemblyResolve += AssemblyLibLoader; - SetupAssemblyFilenames(true); } internal static void SetupAssemblyFilenames(bool force = false) @@ -93,8 +93,8 @@ namespace IPA.Loader }).All(f => true); // force it to iterate all } - var unityData = Directory.EnumerateDirectories(Environment.CurrentDirectory, "*_Data").First(); - AddDir(Path.Combine(unityData, "Plugins")); + //var unityData = Directory.EnumerateDirectories(Environment.CurrentDirectory, "*_Data").First(); + //AddDir(Path.Combine(unityData, "Plugins")); foreach (var dir in Environment.GetEnvironmentVariable("path").Split(Path.PathSeparator)) AddDir(dir); diff --git a/IPA/obj/Debug/IPA.csproj.CoreCompileInputs.cache b/IPA/obj/Debug/IPA.csproj.CoreCompileInputs.cache deleted file mode 100644 index f8d3f98f..00000000 --- a/IPA/obj/Debug/IPA.csproj.CoreCompileInputs.cache +++ /dev/null @@ -1 +0,0 @@ -cc86aa342ebce00fb3a7de08cdd743019e060632