godot
godot copied to clipboard
Improve `load_source_code`/`load_text` for `Script`/`TextFile`
Set modification time when successfully loaded.
load_source_code has been implemented in GDScript/CSharpScript. It is important for the reload of tool scripts. Now abstracted in Script.
Split from #66658.
As the we're in the feature freeze part of the 4.1 release, I'll push the milestone to 4.2 as this PR is an enhancement PR. But I'll add the issue to the list of issues to team review after the release.
Different types of files have different update mechanisms, this PR is a bit ill-considered.