From 2e7187795aa0c12d80aa38012b23c7b7742b20bc Mon Sep 17 00:00:00 2001 From: Katy Coe Date: Thu, 24 Dec 2020 00:04:21 +0100 Subject: [PATCH] GUI: Load plugins even if plugin window never opened --- Il2CppInspector.Common/Plugins/PluginManager.cs | 3 +++ Il2CppInspector.GUI/App.xaml.cs | 3 +++ 2 files changed, 6 insertions(+) diff --git a/Il2CppInspector.Common/Plugins/PluginManager.cs b/Il2CppInspector.Common/Plugins/PluginManager.cs index 3d15bcf..e8a8835 100644 --- a/Il2CppInspector.Common/Plugins/PluginManager.cs +++ b/Il2CppInspector.Common/Plugins/PluginManager.cs @@ -119,6 +119,9 @@ namespace Il2CppInspector // If not used, all status updates are suppressed public static event EventHandler StatusHandler; + // Force plugins to load if they haven't already + public static PluginManager EnsureInit() => AsInstance; + // Find and load all available plugins from disk public static void Reload(string pluginPath = null) { // Update plugin folder if requested, otherwise use current setting diff --git a/Il2CppInspector.GUI/App.xaml.cs b/Il2CppInspector.GUI/App.xaml.cs index 4b5c20e..7f7e7fd 100644 --- a/Il2CppInspector.GUI/App.xaml.cs +++ b/Il2CppInspector.GUI/App.xaml.cs @@ -47,6 +47,9 @@ namespace Il2CppInspectorGUI ex = ex.InnerException; } }; + + // Load plugins + PluginManager.EnsureInit(); } private Metadata metadata;