From 479ed47da24155201f643f189827f2fe10260ad7 Mon Sep 17 00:00:00 2001 From: Herp Derpinstine Date: Sun, 8 Dec 2024 17:23:25 -0600 Subject: [PATCH] Fixed an issue with Compatibility Layers not loading from Base Directory --- Dependencies/CompatibilityLayers/IPA/IPA/PluginManager.cs | 1 - MelonLoader/CompatibilityLayers/MelonCompatibilityLayer.cs | 2 +- MelonLoader/Resolver/MelonAssemblyResolver.cs | 1 + 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dependencies/CompatibilityLayers/IPA/IPA/PluginManager.cs b/Dependencies/CompatibilityLayers/IPA/IPA/PluginManager.cs index 04ba76c59..ab0f3fc42 100644 --- a/Dependencies/CompatibilityLayers/IPA/IPA/PluginManager.cs +++ b/Dependencies/CompatibilityLayers/IPA/IPA/PluginManager.cs @@ -1,6 +1,5 @@ using System.Collections.Generic; using IllusionPlugin; -using MelonLoader; using MelonLoader.Utils; namespace IllusionInjector diff --git a/MelonLoader/CompatibilityLayers/MelonCompatibilityLayer.cs b/MelonLoader/CompatibilityLayers/MelonCompatibilityLayer.cs index f9b622239..be5379988 100644 --- a/MelonLoader/CompatibilityLayers/MelonCompatibilityLayer.cs +++ b/MelonLoader/CompatibilityLayers/MelonCompatibilityLayer.cs @@ -8,7 +8,7 @@ namespace MelonLoader { public static class MelonCompatibilityLayer { - public static string baseDirectory = $"{MelonEnvironment.GameRootDirectory}{Path.DirectorySeparatorChar}MelonLoader{Path.DirectorySeparatorChar}Dependencies{Path.DirectorySeparatorChar}CompatibilityLayers"; + public static string baseDirectory = $"{MelonEnvironment.MelonBaseDirectory}{Path.DirectorySeparatorChar}MelonLoader{Path.DirectorySeparatorChar}Dependencies{Path.DirectorySeparatorChar}CompatibilityLayers"; private static List layers = new List() { diff --git a/MelonLoader/Resolver/MelonAssemblyResolver.cs b/MelonLoader/Resolver/MelonAssemblyResolver.cs index 1840ae231..32636cee8 100644 --- a/MelonLoader/Resolver/MelonAssemblyResolver.cs +++ b/MelonLoader/Resolver/MelonAssemblyResolver.cs @@ -27,6 +27,7 @@ internal static void Setup() ? MelonEnvironment.Il2CppAssembliesDirectory : MelonEnvironment.UnityGameManagedDirectory), MelonEnvironment.OurRuntimeDirectory, + MelonEnvironment.MelonBaseDirectory, MelonEnvironment.GameRootDirectory); // Setup Redirections