Plugins: Add ICorePlugin, enable by default

This commit is contained in:
Katy Coe
2021-01-12 00:15:59 +01:00
parent 5fdea13859
commit 92451e26ef
2 changed files with 18 additions and 1 deletions

View File

@@ -214,7 +214,10 @@ namespace Il2CppInspector
if (AsInstance.ManagedPlugins.Any(p => p.Plugin.Id == plugin.Id))
throw new Exception($"Multiple copies of {plugin.Name} were found. Please ensure the plugins folder only contains one copy of each plugin.");
AsInstance.ManagedPlugins.Add(new ManagedPlugin { Plugin = plugin, Available = true, Enabled = false });
// Enable internal plugins by default
var enabled = typeof(ICorePlugin).IsAssignableFrom(type);
AsInstance.ManagedPlugins.Add(new ManagedPlugin { Plugin = plugin, Available = true, Enabled = enabled });
}
// Add older versions here with adapters