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 script is edited externally, it correctly reloads in the script editor if the script is open. Otherwise, the edit appears to be undetected, and the wrong script is displayed.
This greatly affects teams where script changes are frequently pulled, where an editor restart is currently required after every pull ( not good ), but can be tested manually with two editor processes running, or by editing a script externally.
The scripts are only out of date within the editor itself. Running the project will use the updated changes, even when its script editor conflicts with what is expected.
Video demonstration (using two editors):
Godot_v4.4-dev7_win64_Icj1F8LseJ.mp4
Steps to reproduce
Run the editor, and leave a script closed.
Edit that script externally by any means.
Focus the editor, and it will not pick up the script changes.
Minimal reproduction project (MRP)
N/A
The text was updated successfully, but these errors were encountered:
Let me know if I have correctly understood the issue.
If you have a script opened in the script editor and that you edit it externaly with for example Notepad++, the editor detects a change of the file and will prompt you about it and reload the file.
If you have a script that isnt opened in the editor BUT you externaly edit, you wont have any notification of change made to the file that wasnt opened in the editor.
So in the second case mentioned, if you then open the script in the godot editor after editing it externaly, is it containing the updated content or does it look like a older cached version of the file ?
the editor deploys listenners for file changes only for opened files ( most likely to save on performance and resources )
the editor "preload" all scripts into a cache at project load moment and after that only work into a diff / incremental way to detect live changes
I can think of these possible solutions:
have listenners always created and listenning for any changes done to any dependencies of the project and reload any changed ones ( scripts, resources, addons, etc... ) => extremely accurate monitoring of changes but in same time very aggressive on system resources usage
have the editor to always reload from storage instead of cache => solve the issue of continuous resource usage but can have a big impact on big projects with massive files which would take ages to load , imagine for example changing one file that is a dependency of another set of massive files, it would mean potentialy that we have to reload not only the changed one but also the others
maybe base the detection and need for a reload against a checksum, if a loaded file of the project ( but not opened ) checksum is different from the checksum of the file on the storage drive then compute which set of files have to be reloaded including this one too
Tested versions
System information
Godot v4.4.dev7 - Windows 11 (build 22631) - Multi-window, 2 monitors - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 2070 SUPER (NVIDIA; 32.0.15.6603) - Intel(R) Core(TM) i7-10700F CPU @ 2.90GHz (16 threads)
Issue description
When a script is edited externally, it correctly reloads in the script editor if the script is open. Otherwise, the edit appears to be undetected, and the wrong script is displayed.
This greatly affects teams where script changes are frequently pulled, where an editor restart is currently required after every pull ( not good ), but can be tested manually with two editor processes running, or by editing a script externally.
The scripts are only out of date within the editor itself. Running the project will use the updated changes, even when its script editor conflicts with what is expected.
Video demonstration (using two editors):
Godot_v4.4-dev7_win64_Icj1F8LseJ.mp4
Steps to reproduce
Minimal reproduction project (MRP)
N/A
The text was updated successfully, but these errors were encountered: