public void Unregister(IEditorPlugin plugin)
        {
            if (!activePlugins.ContainsKey(plugin.GetType()))
            {
                throw new InvalidOperationException($"Plugin of type '{plugin.GetType()}' has not been registered.");
            }

            Logger.Debug($"Unregistering plugin '{plugin.GetType().FullName}'...");

            var rplugin = activePlugins[plugin.GetType()];

            if (plugin != rplugin)
            {
                Logger.Warning($"A different instance of plugin '{plugin.GetType()}' has been registered and unregistered. Make sure the plugin has no state.");
            }

            plugin.UnregisterPlugin(Services);
            activePlugins.Remove(plugin.GetType());

            Logger.Info($"Unregistered plugin '{plugin.GetType().FullName}'.");
        }