| 838 | } |
| 839 | |
| 840 | void ScriptEngine::UnregisterPlugin(std::string_view path) |
| 841 | { |
| 842 | try |
| 843 | { |
| 844 | auto pluginIt = std::find_if(_plugins.begin(), _plugins.end(), [path](const std::shared_ptr<Plugin>& plugin) { |
| 845 | return plugin->GetPath() == path; |
| 846 | }); |
| 847 | auto& plugin = *pluginIt; |
| 848 | |
| 849 | StopPlugin(plugin, true); |
| 850 | UnloadPlugin(plugin); |
| 851 | LogPluginInfo(plugin, "Unregistered"); |
| 852 | |
| 853 | _plugins.erase(pluginIt); |
| 854 | } |
| 855 | catch (const std::exception& e) |
| 856 | { |
| 857 | _console.WriteLineError(e.what()); |
| 858 | } |
| 859 | } |
| 860 | |
| 861 | void ScriptEngine::RegisterPlugin(std::string_view path) |
| 862 | { |
nothing calls this directly
no test coverage detected