godot: Auto Reload Scripts On External Change does not work

Godot version: v4.0.dev.custom_build.5d9cab3ae

OS/device including version: Artix Linux 5.12.8 $ uname -a provides the following output: Linux x1e2 5.12.8-artix1-1 #1 SMP PREEMPT Fri, 28 May 2021 22:51:03 +0000 x86_64 GNU/Linux

Issue description: Editing scripts from an external editor and saving them does not trigger the Godot editor to reload the script. Tried this with neovim within terminal, and also VS Code.

Steps to reproduce: Open the editor settings and set the following:

  • General > Text Editor > Files > Auto Reload Scripts on External Change : True
  • General > Text Editor > Files > Auto Reload and Parse Scripts On Save : True
  • General > Text Editor > External > Use External Editor : True

For neovim:

  • General > Text Editor > External > Exec Path : /usr/local/bin/st (I use suckless terminal)
  • General > Text Editor > External > Exec Flags : -n TerminalFloat /usr/bin/nvim -c "cd {project}" -c "call cursor ({line}, {col})" {file} – this names the terminal TerminalFloat so that my window manager makes it floating (i3-gaps), launches /usr/bin/nvim (neovim), and issues to neovim the command "cd {project}" and "call cursor ({line},{col})", and passes the filename {file}.

For VS Code:

  • General > Text Editor > External > Exec Path : /usr/bin/code
  • General > Text Editor > External > Exec Flags : {project} --goto {file}:{line}:{col} – exactly as the docs say

In either case, continue:

  • Open a script (new or existing) from the Godot editor – it will correctly open the file in the specified external editor
  • Edit and save the script from within the external editor, particularly making changes to exported variables
  • Observe that no Output log message appears stating that the script was reloaded, and observe that no changes appear in the inspector to reflect changes made from the external editor

Minimal reproduction project:

An empty new project, with external text editor settings enabled

Screenshots image image

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 8
  • Comments: 16 (14 by maintainers)

Most upvoted comments

Still not working for me and it looks like I’m running into the same issue. I’m using the official v4.0.beta1.official [20d667284] Godot version and Webstorm as my external editor. Whenever I edit a script in Webstorm, Godot does not notice.

You should open an other issue with more details, if it effects specific file types or all and system specs and if any error messages, you can then link to this as reference.

I just tested on commit ea4b8de2b4c06e6f18bf0470d716f787bddfecc3 and no, it is not resolved:

  • Scripts still do not automatically reload & update exports in the editor
  • Export vars (that get loaded when the scene is loaded) are now duplicated in the inspector

No idea when the duplication started; I haven’t tried a master build in a while.

It seems 3.4.2.stable no longer prints the “Another resource is loaded” message when GDScript is changed; therefore, I believe seeing this message was considered a bug, and apparently still exists for C# scripts.

However, it is not the bug I’ve reported here, where master fails to reload scripts at all upon external change.

I searched briefly and couldn’t find an issue for that message nor the commit that changed it, but I didn’t look very hard. At least your scripts are still reloading! 😛 If it bothers you, feel free to make a separate issue for it.

Reopening as #49473 is reverted by #55804.