From 792268f52f95bc379afc9dd6f7b70d7aa9f3821e Mon Sep 17 00:00:00 2001 From: LukeFZ <17146677+LukeFZ@users.noreply.github.com> Date: Thu, 7 Nov 2024 12:51:58 +0100 Subject: [PATCH] Disable plugin loading for now --- Il2CppInspector.Common/Plugins/Internal/PluginManager.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Il2CppInspector.Common/Plugins/Internal/PluginManager.cs b/Il2CppInspector.Common/Plugins/Internal/PluginManager.cs index e146c35..991be6c 100644 --- a/Il2CppInspector.Common/Plugins/Internal/PluginManager.cs +++ b/Il2CppInspector.Common/Plugins/Internal/PluginManager.cs @@ -113,7 +113,8 @@ namespace Il2CppInspector // Global enable/disable flag for entire plugin system // If set to false, all plugins will be unloaded // Disable this if you want to create standalone apps using the API but without plugins - private static bool _enabled = true; + private static bool _enabled = false; + public static bool Enabled { get => _enabled; set { @@ -123,7 +124,7 @@ namespace Il2CppInspector } // All of the detected plugins, including invalid/incompatible/non-loaded plugins - public ObservableCollection ManagedPlugins { get; } = new ObservableCollection(); + public ObservableCollection ManagedPlugins { get; } = []; // All of the plugins that are loaded and available for use public static IEnumerable AvailablePlugins => AsInstance.ManagedPlugins.Where(p => p.Available).Select(p => p.Plugin); @@ -136,7 +137,7 @@ namespace Il2CppInspector => AsInstance.ManagedPlugins.Where(p => p.Available).ToDictionary(p => p.Plugin.Id, p => p); // The relative path from the executable that we'll search for plugins - private static string pluginFolder = Path.GetFullPath(Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName) + Path.DirectorySeparatorChar + "plugins"); + private static string pluginFolder = Path.GetFullPath(Path.GetDirectoryName(Environment.ProcessPath) + Path.DirectorySeparatorChar + "plugins"); // A placeholder plugin to be used when the real plugin cannot be loaded for some reason private class InvalidPlugin : IPlugin