Open me2beats opened 3 years ago
In a use case like this it should be combined with a way to query wich plugin is enabled, as some plugins may already be enabled when Godot starts or when the plugin starts, and doing this solely with signals would suffer from execution order.
Describe the project you are working on
Plugins
Describe the problem or limitation you are having in your project
I'm going to write a series of plugins that do something when a certain plugin X becomes active or inactive.
I could make work of plugins, where one plugin depends on another, safer. For example, plugin
Y
, which depends on pluginX
, might refuse to work once the user disables pluginX
.Another scenario would be to do something when any plugin is activated/deactivated: "auto A when enabling a plugin" "auto B when disabling a plugin" etc
The problem is I can't seem to do it in an efficient way.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Adding
plugin_enabled
andplugin_disabled
signals would solve the problem.Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
If this enhancement will not be used often, can it be worked around with a few lines of script?
This would be inefficient
Is there a reason why this should be core and not an add-on in the asset library?
These signals could be used by the engine itself as well.