From f400445ba1f237bd0b77fb6e00fa088e448fc340 Mon Sep 17 00:00:00 2001 From: ghorsington Date: Sat, 9 Jul 2022 21:47:38 +0300 Subject: [PATCH] Refactor Unity -> UnityMono Use runtime names for BepInEx modules instead of just the game engine --- BepInEx.Core/Properties/AssemblyInfo.cs | 2 +- BepInEx.Preloader.Core/Properties/AssemblyInfo.cs | 2 +- .../BepInEx.Preloader.UnityMono.csproj | 7 ++++--- .../DoorstopEntrypoint.cs | 9 +++++---- .../EntrypointPatcher.cs | 4 ++-- .../RuntimeFixes/TraceFix.cs | 2 +- .../RuntimeFixes/UnityPatches.cs | 2 +- .../RuntimeFixes/XTermFix.cs | 2 +- .../UnityPreloader.cs | 3 ++- .../UnityPreloaderRunner.cs | 3 ++- .../BaseUnityPlugin.cs | 4 ++-- .../BepInEx.UnityMono.csproj | 11 ++++++----- .../BepInExInstance.cs | 4 ++-- .../Bootstrap/UnityChainloader.cs | 6 +++--- .../Configuration/KeyboardShortcut.cs | 5 +++-- .../Logging/UnityLogListener.cs | 2 +- .../Logging/UnityLogSource.cs | 2 +- .../ThreadingHelper.cs | 2 +- .../UnityTomlTypeConverters.cs | 2 +- BepInEx.sln | 6 +++--- BepInExTests/BepInExTests.csproj | 2 +- build.cake | 2 +- doorstop/doorstop_config_mono.ini | 2 +- 23 files changed, 46 insertions(+), 40 deletions(-) rename BepInEx.Preloader.Unity/BepInEx.Preloader.Unity.csproj => BepInEx.Preloader.UnityMono/BepInEx.Preloader.UnityMono.csproj (79%) rename {BepInEx.Preloader.Unity => BepInEx.Preloader.UnityMono}/DoorstopEntrypoint.cs (77%) rename {BepInEx.Preloader.Unity => BepInEx.Preloader.UnityMono}/EntrypointPatcher.cs (98%) rename {BepInEx.Preloader.Unity => BepInEx.Preloader.UnityMono}/RuntimeFixes/TraceFix.cs (97%) rename {BepInEx.Preloader.Unity => BepInEx.Preloader.UnityMono}/RuntimeFixes/UnityPatches.cs (96%) rename {BepInEx.Preloader.Unity => BepInEx.Preloader.UnityMono}/RuntimeFixes/XTermFix.cs (98%) rename {BepInEx.Preloader.Unity => BepInEx.Preloader.UnityMono}/UnityPreloader.cs (98%) rename {BepInEx.Preloader.Unity => BepInEx.Preloader.UnityMono}/UnityPreloaderRunner.cs (97%) rename {BepInEx.Unity => BepInEx.UnityMono}/BaseUnityPlugin.cs (94%) rename BepInEx.Unity/BepInEx.Unity.csproj => BepInEx.UnityMono/BepInEx.UnityMono.csproj (72%) rename {BepInEx.Unity => BepInEx.UnityMono}/BepInExInstance.cs (59%) rename {BepInEx.Unity => BepInEx.UnityMono}/Bootstrap/UnityChainloader.cs (98%) rename {BepInEx.Unity => BepInEx.UnityMono}/Configuration/KeyboardShortcut.cs (98%) rename {BepInEx.Unity => BepInEx.UnityMono}/Logging/UnityLogListener.cs (98%) rename {BepInEx.Unity => BepInEx.UnityMono}/Logging/UnityLogSource.cs (98%) rename {BepInEx.Unity => BepInEx.UnityMono}/ThreadingHelper.cs (99%) rename {BepInEx.Unity => BepInEx.UnityMono}/UnityTomlTypeConverters.cs (97%) diff --git a/BepInEx.Core/Properties/AssemblyInfo.cs b/BepInEx.Core/Properties/AssemblyInfo.cs index 817bf39..c48dd51 100644 --- a/BepInEx.Core/Properties/AssemblyInfo.cs +++ b/BepInEx.Core/Properties/AssemblyInfo.cs @@ -1,7 +1,7 @@ using System.Runtime.CompilerServices; [assembly: InternalsVisibleTo("BepInEx.Preloader.Core")] -[assembly: InternalsVisibleTo("BepInEx.Unity")] +[assembly: InternalsVisibleTo("BepInEx.UnityMono")] [assembly: InternalsVisibleTo("BepInEx.NetLauncher")] [assembly: InternalsVisibleTo("BepInEx.NetCore")] [assembly: InternalsVisibleTo("BepInEx.IL2CPP")] diff --git a/BepInEx.Preloader.Core/Properties/AssemblyInfo.cs b/BepInEx.Preloader.Core/Properties/AssemblyInfo.cs index 6fdd874..321fa22 100644 --- a/BepInEx.Preloader.Core/Properties/AssemblyInfo.cs +++ b/BepInEx.Preloader.Core/Properties/AssemblyInfo.cs @@ -1,6 +1,6 @@ using System.Runtime.CompilerServices; -[assembly: InternalsVisibleTo("BepInEx.Preloader.Unity")] +[assembly: InternalsVisibleTo("BepInEx.Preloader.UnityMono")] [assembly: InternalsVisibleTo("BepInEx.NetLauncher")] [assembly: InternalsVisibleTo("BepInEx.NetCore")] [assembly: InternalsVisibleTo("BepInEx.IL2CPP")] diff --git a/BepInEx.Preloader.Unity/BepInEx.Preloader.Unity.csproj b/BepInEx.Preloader.UnityMono/BepInEx.Preloader.UnityMono.csproj similarity index 79% rename from BepInEx.Preloader.Unity/BepInEx.Preloader.Unity.csproj rename to BepInEx.Preloader.UnityMono/BepInEx.Preloader.UnityMono.csproj index 387846c..114caa7 100644 --- a/BepInEx.Preloader.Unity/BepInEx.Preloader.Unity.csproj +++ b/BepInEx.Preloader.UnityMono/BepInEx.Preloader.UnityMono.csproj @@ -1,13 +1,14 @@  net35;netstandard2.0 - BepInEx.Preloader.Unity - BepInEx.Preloader.Unity + BepInEx.Preloader.UnityMono + BepInEx.Preloader.UnityMono true + BepInEx.Preloader.UnityMono - ..\bin\Unity\ + ..\bin\UnityMono\ false diff --git a/BepInEx.Preloader.Unity/DoorstopEntrypoint.cs b/BepInEx.Preloader.UnityMono/DoorstopEntrypoint.cs similarity index 77% rename from BepInEx.Preloader.Unity/DoorstopEntrypoint.cs rename to BepInEx.Preloader.UnityMono/DoorstopEntrypoint.cs index 89d0e94..2f8e13d 100644 --- a/BepInEx.Preloader.Unity/DoorstopEntrypoint.cs +++ b/BepInEx.Preloader.UnityMono/DoorstopEntrypoint.cs @@ -1,8 +1,9 @@ using System; using System.IO; using BepInEx.Preloader.Core; -using BepInEx.Preloader.Unity; +using BepInEx.Preloader.UnityMono; +// ReSharper disable once CheckNamespace namespace Doorstop; internal static class Entrypoint @@ -24,9 +25,9 @@ internal static class Entrypoint // In some versions of Unity 4, Mono tries to resolve BepInEx.dll prematurely because of the call to Paths.SetExecutablePath // To prevent that, we have to use reflection and a separate startup class so that we can install required assembly resolvers before the main code - typeof(Doorstop.Entrypoint).Assembly.GetType($"BepInEx.Preloader.Unity.{nameof(UnityPreloaderRunner)}") - ?.GetMethod(nameof(UnityPreloaderRunner.PreloaderPreMain)) - ?.Invoke(null, null); + typeof(Entrypoint).Assembly.GetType($"BepInEx.Preloader.UnityMono.{nameof(UnityPreloaderRunner)}") + ?.GetMethod(nameof(UnityPreloaderRunner.PreloaderPreMain)) + ?.Invoke(null, null); } catch (Exception ex) { diff --git a/BepInEx.Preloader.Unity/EntrypointPatcher.cs b/BepInEx.Preloader.UnityMono/EntrypointPatcher.cs similarity index 98% rename from BepInEx.Preloader.Unity/EntrypointPatcher.cs rename to BepInEx.Preloader.UnityMono/EntrypointPatcher.cs index 6f4b774..b248711 100644 --- a/BepInEx.Preloader.Unity/EntrypointPatcher.cs +++ b/BepInEx.Preloader.UnityMono/EntrypointPatcher.cs @@ -9,7 +9,7 @@ using BepInEx.Preloader.Core.Patching; using Mono.Cecil; using Mono.Cecil.Cil; -namespace BepInEx.Preloader.Unity; +namespace BepInEx.Preloader.UnityMono; [PatcherPluginInfo("io.bepinex.entrypointpatcher", "BepInEx Entrypoint", "1.0")] internal class EntrypointPatcher : BasePatcher @@ -56,7 +56,7 @@ internal class EntrypointPatcher : BasePatcher if (entryType == null) throw new Exception("The entrypoint type is invalid! Please check your config/BepInEx.cfg file"); - var chainloaderAssemblyPath = Path.Combine(Paths.BepInExAssemblyDirectory, "BepInEx.Unity.dll"); + var chainloaderAssemblyPath = Path.Combine(Paths.BepInExAssemblyDirectory, "BepInEx.UnityMono.dll"); var readerParameters = new ReaderParameters { diff --git a/BepInEx.Preloader.Unity/RuntimeFixes/TraceFix.cs b/BepInEx.Preloader.UnityMono/RuntimeFixes/TraceFix.cs similarity index 97% rename from BepInEx.Preloader.Unity/RuntimeFixes/TraceFix.cs rename to BepInEx.Preloader.UnityMono/RuntimeFixes/TraceFix.cs index e6f5446..01fc0f3 100644 --- a/BepInEx.Preloader.Unity/RuntimeFixes/TraceFix.cs +++ b/BepInEx.Preloader.UnityMono/RuntimeFixes/TraceFix.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Reflection; using HarmonyLib; -namespace BepInEx.Preloader.RuntimeFixes; +namespace BepInEx.Preloader.UnityMono.RuntimeFixes; /// /// This exists because the Mono implementation of is/was broken, and would call Write directly diff --git a/BepInEx.Preloader.Unity/RuntimeFixes/UnityPatches.cs b/BepInEx.Preloader.UnityMono/RuntimeFixes/UnityPatches.cs similarity index 96% rename from BepInEx.Preloader.Unity/RuntimeFixes/UnityPatches.cs rename to BepInEx.Preloader.UnityMono/RuntimeFixes/UnityPatches.cs index 6f1b499..99b5372 100644 --- a/BepInEx.Preloader.Unity/RuntimeFixes/UnityPatches.cs +++ b/BepInEx.Preloader.UnityMono/RuntimeFixes/UnityPatches.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.Reflection; using HarmonyLib; -namespace BepInEx.Preloader.RuntimeFixes; +namespace BepInEx.Preloader.UnityMono.RuntimeFixes; internal static class UnityPatches { diff --git a/BepInEx.Preloader.Unity/RuntimeFixes/XTermFix.cs b/BepInEx.Preloader.UnityMono/RuntimeFixes/XTermFix.cs similarity index 98% rename from BepInEx.Preloader.Unity/RuntimeFixes/XTermFix.cs rename to BepInEx.Preloader.UnityMono/RuntimeFixes/XTermFix.cs index f7b1f9c..b2f9e7c 100644 --- a/BepInEx.Preloader.Unity/RuntimeFixes/XTermFix.cs +++ b/BepInEx.Preloader.UnityMono/RuntimeFixes/XTermFix.cs @@ -7,7 +7,7 @@ using MonoMod.RuntimeDetour; using MonoMod.RuntimeDetour.Platforms; using MonoMod.Utils; -namespace BepInEx.Preloader.RuntimeFixes; +namespace BepInEx.Preloader.UnityMono.RuntimeFixes; internal static class XTermFix { diff --git a/BepInEx.Preloader.Unity/UnityPreloader.cs b/BepInEx.Preloader.UnityMono/UnityPreloader.cs similarity index 98% rename from BepInEx.Preloader.Unity/UnityPreloader.cs rename to BepInEx.Preloader.UnityMono/UnityPreloader.cs index 0cca52e..ff83bca 100644 --- a/BepInEx.Preloader.Unity/UnityPreloader.cs +++ b/BepInEx.Preloader.UnityMono/UnityPreloader.cs @@ -9,9 +9,10 @@ using BepInEx.Preloader.Core; using BepInEx.Preloader.Core.Logging; using BepInEx.Preloader.Core.Patching; using BepInEx.Preloader.RuntimeFixes; +using BepInEx.Preloader.UnityMono.RuntimeFixes; using MonoMod.Utils; -namespace BepInEx.Preloader.Unity; +namespace BepInEx.Preloader.UnityMono; /// /// The main entrypoint of BepInEx, and initializes all patchers and the chainloader. diff --git a/BepInEx.Preloader.Unity/UnityPreloaderRunner.cs b/BepInEx.Preloader.UnityMono/UnityPreloaderRunner.cs similarity index 97% rename from BepInEx.Preloader.Unity/UnityPreloaderRunner.cs rename to BepInEx.Preloader.UnityMono/UnityPreloaderRunner.cs index ff5caa2..7391874 100644 --- a/BepInEx.Preloader.Unity/UnityPreloaderRunner.cs +++ b/BepInEx.Preloader.UnityMono/UnityPreloaderRunner.cs @@ -4,8 +4,9 @@ using System.Linq; using System.Reflection; using BepInEx.Preloader.Core; using BepInEx.Preloader.RuntimeFixes; +using BepInEx.Preloader.UnityMono.RuntimeFixes; -namespace BepInEx.Preloader.Unity; +namespace BepInEx.Preloader.UnityMono; internal static class UnityPreloaderRunner { diff --git a/BepInEx.Unity/BaseUnityPlugin.cs b/BepInEx.UnityMono/BaseUnityPlugin.cs similarity index 94% rename from BepInEx.Unity/BaseUnityPlugin.cs rename to BepInEx.UnityMono/BaseUnityPlugin.cs index 8ea0ff2..8662eef 100644 --- a/BepInEx.Unity/BaseUnityPlugin.cs +++ b/BepInEx.UnityMono/BaseUnityPlugin.cs @@ -3,7 +3,7 @@ using BepInEx.Configuration; using BepInEx.Logging; using UnityEngine; -namespace BepInEx; +namespace BepInEx.UnityMono; /// /// The base plugin type that is used by the BepInEx plugin loader. @@ -30,7 +30,7 @@ public abstract class BaseUnityPlugin : MonoBehaviour Location = GetType().Assembly.Location }; - Logger = Logging.Logger.CreateLogSource(metadata.Name); + Logger = BepInEx.Logging.Logger.CreateLogSource(metadata.Name); Config = new ConfigFile(Utility.CombinePaths(Paths.ConfigPath, metadata.GUID + ".cfg"), false, metadata); } diff --git a/BepInEx.Unity/BepInEx.Unity.csproj b/BepInEx.UnityMono/BepInEx.UnityMono.csproj similarity index 72% rename from BepInEx.Unity/BepInEx.Unity.csproj rename to BepInEx.UnityMono/BepInEx.UnityMono.csproj index 45b2f7f..a8b10f7 100644 --- a/BepInEx.Unity/BepInEx.Unity.csproj +++ b/BepInEx.UnityMono/BepInEx.UnityMono.csproj @@ -2,19 +2,20 @@ BepInEx support library for Mono Unity games net35;netstandard2.0 - BepInEx.Unity - BepInEx.Unity + BepInEx.UnityMono + BepInEx.UnityMono true + BepInEx.UnityMono - - ..\bin\Unity\ + + ..\bin\UnityMono\ false - + diff --git a/BepInEx.Unity/BepInExInstance.cs b/BepInEx.UnityMono/BepInExInstance.cs similarity index 59% rename from BepInEx.Unity/BepInExInstance.cs rename to BepInEx.UnityMono/BepInExInstance.cs index cda5895..6fea451 100644 --- a/BepInEx.Unity/BepInExInstance.cs +++ b/BepInEx.UnityMono/BepInExInstance.cs @@ -1,6 +1,6 @@ -using BepInEx.Unity.Bootstrap; +using BepInEx.UnityMono.Bootstrap; -namespace BepInEx.Unity; +namespace BepInEx.UnityMono; public static class BepInExInstance { diff --git a/BepInEx.Unity/Bootstrap/UnityChainloader.cs b/BepInEx.UnityMono/Bootstrap/UnityChainloader.cs similarity index 98% rename from BepInEx.Unity/Bootstrap/UnityChainloader.cs rename to BepInEx.UnityMono/Bootstrap/UnityChainloader.cs index ef1e757..8c90670 100644 --- a/BepInEx.Unity/Bootstrap/UnityChainloader.cs +++ b/BepInEx.UnityMono/Bootstrap/UnityChainloader.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Diagnostics; using System.IO; using System.Reflection; @@ -7,7 +7,7 @@ using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using BepInEx.Preloader.Core.Logging; -using BepInEx.Unity.Logging; +using BepInEx.UnityMono.Logging; using MonoMod.Utils; using UnityEngine; using Logger = BepInEx.Logging.Logger; @@ -16,7 +16,7 @@ using Object = UnityEngine.Object; [assembly: InternalsVisibleTo("UnityEngine")] [assembly: InternalsVisibleTo("UnityEngine.Core")] -namespace BepInEx.Unity.Bootstrap; +namespace BepInEx.UnityMono.Bootstrap; /// /// The manager and loader for all plugins, and the entry point for BepInEx plugin system. diff --git a/BepInEx.Unity/Configuration/KeyboardShortcut.cs b/BepInEx.UnityMono/Configuration/KeyboardShortcut.cs similarity index 98% rename from BepInEx.Unity/Configuration/KeyboardShortcut.cs rename to BepInEx.UnityMono/Configuration/KeyboardShortcut.cs index a8ffd88..97ee43d 100644 --- a/BepInEx.Unity/Configuration/KeyboardShortcut.cs +++ b/BepInEx.UnityMono/Configuration/KeyboardShortcut.cs @@ -1,11 +1,12 @@ using System; using System.Collections.Generic; using System.Linq; +using BepInEx.Configuration; using BepInEx.Logging; using UnityEngine; using Logger = BepInEx.Logging.Logger; -namespace BepInEx.Configuration; +namespace BepInEx.UnityMono.Configuration; /// /// A keyboard shortcut that can be used in Update method to check if user presses a key combo. The shortcut is only @@ -54,7 +55,7 @@ public struct KeyboardShortcut /// Main key to press /// Keys that should be held down before main key is registered public KeyboardShortcut(KeyCode mainKey, params KeyCode[] modifiers) : this(new[] { mainKey }.Concat(modifiers) - .ToArray()) + .ToArray()) { if (mainKey == KeyCode.None && modifiers.Any()) throw new diff --git a/BepInEx.Unity/Logging/UnityLogListener.cs b/BepInEx.UnityMono/Logging/UnityLogListener.cs similarity index 98% rename from BepInEx.Unity/Logging/UnityLogListener.cs rename to BepInEx.UnityMono/Logging/UnityLogListener.cs index bd3f56a..6618e7c 100644 --- a/BepInEx.Unity/Logging/UnityLogListener.cs +++ b/BepInEx.UnityMono/Logging/UnityLogListener.cs @@ -7,7 +7,7 @@ using BepInEx.Logging; using UnityEngine; using Logger = BepInEx.Logging.Logger; -namespace BepInEx.Unity.Logging +namespace BepInEx.UnityMono.Logging { /// /// Logs entries using Unity specific outputs. diff --git a/BepInEx.Unity/Logging/UnityLogSource.cs b/BepInEx.UnityMono/Logging/UnityLogSource.cs similarity index 98% rename from BepInEx.Unity/Logging/UnityLogSource.cs rename to BepInEx.UnityMono/Logging/UnityLogSource.cs index 4ac3b38..b1ba196 100644 --- a/BepInEx.Unity/Logging/UnityLogSource.cs +++ b/BepInEx.UnityMono/Logging/UnityLogSource.cs @@ -3,7 +3,7 @@ using System.Reflection; using BepInEx.Logging; using UnityEngine; -namespace BepInEx.Unity.Logging; +namespace BepInEx.UnityMono.Logging; /// /// Logs entries using Unity specific outputs. diff --git a/BepInEx.Unity/ThreadingHelper.cs b/BepInEx.UnityMono/ThreadingHelper.cs similarity index 99% rename from BepInEx.Unity/ThreadingHelper.cs rename to BepInEx.UnityMono/ThreadingHelper.cs index a6ca40d..7b7a6dc 100644 --- a/BepInEx.Unity/ThreadingHelper.cs +++ b/BepInEx.UnityMono/ThreadingHelper.cs @@ -8,7 +8,7 @@ using BepInEx.Logging; using UnityEngine; using Logger = BepInEx.Logging.Logger; -namespace BepInEx; +namespace BepInEx.UnityMono; /// /// Provides methods for running code on other threads and synchronizing with the main thread. diff --git a/BepInEx.Unity/UnityTomlTypeConverters.cs b/BepInEx.UnityMono/UnityTomlTypeConverters.cs similarity index 97% rename from BepInEx.Unity/UnityTomlTypeConverters.cs rename to BepInEx.UnityMono/UnityTomlTypeConverters.cs index 8e5615c..43317a2 100644 --- a/BepInEx.Unity/UnityTomlTypeConverters.cs +++ b/BepInEx.UnityMono/UnityTomlTypeConverters.cs @@ -3,7 +3,7 @@ using System.Runtime.CompilerServices; using BepInEx.Configuration; using UnityEngine; -namespace BepInEx.Unity; +namespace BepInEx.UnityMono; /// /// Config types that are unity specific diff --git a/BepInEx.sln b/BepInEx.sln index f9369b4..8d63883 100644 --- a/BepInEx.sln +++ b/BepInEx.sln @@ -10,13 +10,13 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BepInExTests", "BepInExTest EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BepInEx.Preloader.Core", "BepInEx.Preloader.Core\BepInEx.Preloader.Core.csproj", "{15F8BC38-A761-4F93-8903-1B531AC5D9F9}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BepInEx.Unity", "BepInEx.Unity\BepInEx.Unity.csproj", "{EAE9FAE6-8011-45A3-8B6E-0C7F14210533}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BepInEx.UnityMono", "BepInEx.UnityMono\BepInEx.UnityMono.csproj", "{EAE9FAE6-8011-45A3-8B6E-0C7F14210533}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BepInEx.Preloader.Unity", "BepInEx.Preloader.Unity\BepInEx.Preloader.Unity.csproj", "{D404C973-441D-48ED-B266-C21320BA0D87}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BepInEx.Preloader.UnityMono", "BepInEx.Preloader.UnityMono\BepInEx.Preloader.UnityMono.csproj", "{D404C973-441D-48ED-B266-C21320BA0D87}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BepInEx.Core", "BepInEx.Core\BepInEx.Core.csproj", "{4FFBA620-F5ED-47F9-B90C-DAD1316FD9B9}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Unity", "Unity", "{6E2DD21E-0854-4F4A-B925-D90E0016D03D}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "UnityMono", "UnityMono", "{6E2DD21E-0854-4F4A-B925-D90E0016D03D}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BepInEx.NetLauncher", "BepInEx.NetLauncher\BepInEx.NetLauncher.csproj", "{490B052B-7F23-4052-AD04-613856618901}" EndProject diff --git a/BepInExTests/BepInExTests.csproj b/BepInExTests/BepInExTests.csproj index c6d36eb..e7c153c 100644 --- a/BepInExTests/BepInExTests.csproj +++ b/BepInExTests/BepInExTests.csproj @@ -32,6 +32,6 @@ - + diff --git a/build.cake b/build.cake index 0eb8562..598e1fe 100644 --- a/build.cake +++ b/build.cake @@ -266,7 +266,7 @@ Task("MakeDist") foreach (Target target in targets) { (ConvertableDirectoryPath originDir, ConvertableFilePath? doorstopConfigFile) = (Directory(target.Abi), null); if (target.Abi is var abi and ("UnityIL2CPP" or "UnityMono")) { - originDir = Directory(abi is "UnityIL2CPP" ? "IL2CPP" : "Unity"); + originDir = Directory(abi is "UnityIL2CPP" ? "IL2CPP" : "UnityMono"); // TODO: Move config file resolving to Target class doorstopConfigFile = File( target.IsUnix ? diff --git a/doorstop/doorstop_config_mono.ini b/doorstop/doorstop_config_mono.ini index 94390cd..c8ae298 100644 --- a/doorstop/doorstop_config_mono.ini +++ b/doorstop/doorstop_config_mono.ini @@ -6,7 +6,7 @@ enabled=true # Path to the assembly to load and execute # NOTE: The entrypoint must be of format `static void Doorstop.Entrypoint.Start()` -target_assembly=BepInEx\core\BepInEx.Preloader.Unity.dll +target_assembly=BepInEx\core\BepInEx.Preloader.UnityMono.dll # If true, Unity's output log is redirected to \output_log.txt redirect_output_log=false