godot icon indicating copy to clipboard operation
godot copied to clipboard

Fix GDScript docs not updating when modified externally

Open anvilfolk opened this issue 4 months ago • 4 comments

Currently on master if you change a GDScript with an external text editor while Godot is open, it will update the script itself but not the documentation. This PR fixes this.

It's a minor regression from #97168, which avoids scripts being reloaded twice by removing one of the two loads. Unfortunately it was the one that remembered to add docs to EditorHelp. Just made sure the remaining one adds docs.

This does highlight a need for us to refactor documentation generation & adding to EditorHelp. Perhaps this responsibility should exist within the Script classes themselves, or at least ScriptServer. They are the ones that know when documentation has been generated and could add them to EditorHelp when TOOLS_ENABLED.

anvilfolk avatar Oct 01 '24 19:10 anvilfolk