godot-visual-script icon indicating copy to clipboard operation
godot-visual-script copied to clipboard

Refactor VisualScriptEditor

Open mhilbrunner opened this issue 4 years ago • 1 comments

Godot version

master (dc6ed31675)

Issue description

Currently, the VisualScriptEditor class seems a little weirdly implemented. We should review this and refactor if necessary.

Akien:

I'm not familiar with this code but the more common way to do this in Godot would be to go through EditorInterface to get a handle on VisualScriptEditor itself, instead of a proxy singleton.

mhilbrunner avatar Aug 20 '21 11:08 mhilbrunner

For the reference, it was implemented by @vnen in godotengine/godot#12948. I'm not 100% sure what's the better design to implement this feature, but with 4 years additional experience we should be able to figure something out.

Proxy singletons should be kept only for the core classes like OS, Engine, etc.

akien-mga avatar Aug 20 '21 11:08 akien-mga