You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a plugin uses a Singleton, you know that until the singleton is added to Autoload, the engine doesnt recognize the the name in scripts, lets take dialogic as example, it uses a singleton called: Dialogic but since you open the project the Scripts are parsed and checked, and this generates error since Singleton isnt recognized, then the engine doesnt recognizing it thus you cant enable the plugin!
workaround:
add the autoload manually before enabling the plugin
Steps to reproduce
Open Project
Create a new plugin
Make it using a singleton
Disable plugin
Close Project
Open Project again
Try to enable plugin
Minimal reproduction project
just download dialogic and place it on your project
This is imho an expected environmental constraint a plugin must operate under.
The correct way to handles this, as the plugin developer, is to not rely on the name.
Neither should the user be required to add the autoload, the plugin can do that.
What to do:
In the EditorPlugin's _enter_tree(), you register the autoload under a name. This name is purely for the user, not for the plugin.
In the plugins various scripts, you add this line: var plugin_autoload: Node = $"/root/plugin_autoload", and use this variable instead of the autoloads name.
Godot version
4.0 beta 6
System information
manjaro linux
Issue description
When a plugin uses a Singleton, you know that until the singleton is added to Autoload, the engine doesnt recognize the the name in scripts, lets take dialogic as example, it uses a singleton called:
Dialogic
but since you open the project the Scripts are parsed and checked, and this generates error since Singleton isnt recognized, then the engine doesnt recognizing it thus you cant enable the plugin!workaround:
Steps to reproduce
Minimal reproduction project
just download dialogic and place it on your project
https://github.com/coppolaemilio/dialogic
The text was updated successfully, but these errors were encountered: