-
-
Notifications
You must be signed in to change notification settings - Fork 21k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changing name of script after using it in preload()
generates "Could not resolve script" error, recoverable only by reloading project
#92007
Comments
I can reproduce the issue on Fedora 40 with 4.3.beta (5708a3a). After renaming the first script, and saving the one with
At this step:
Occasionally it does seem to resolve the error after printing this once. In 4.2.2-stable, the issue seems similar, though I had to do explicit changes to the scripts to start catching errors, while in 4.3.beta just saving the script without modification was enough. Note: On 4.3.beta on Linux, when renaming a script in the FS dock, I get this error: |
Tested versions
v4.3.beta.custom_build [557f63d]
Custom build for the
precision=double
flagSystem information
Godot v4.3.beta (557f63d) - Windows 10.0.22631 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3050 Ti Laptop GPU (NVIDIA; 31.0.15.3598) - AMD Ryzen 7 5800H with Radeon Graphics (16 Threads)
Issue description
Using a script's path in a
const XXX := preload()
function, and then renaming the script using Godot's "Rename" menu command, gives a "Error at (xx, yy): Could not resolve script "res://script_name.gd".The error persists even after retyping the expression. Using "=" instead of ":=" also does not make the error go away. Renaming the script back and using the old name in
preload()
also does not resolve the issue.It's undoable. Gives vibes of "Anton Chigurh" in "No Country for Old Men".
Steps to reproduce
const
usingpreload()
. e.g.const ScriptA := preload("res://script_a.gd")
.preload()
function, rename the first script to original name, close and reopen the second script, and try a few other things, but the error persists.Minimal reproduction project (MRP)
The steps above to reproduce the issue are sufficient to display the problem, and no MRP is needed.
The text was updated successfully, but these errors were encountered: