Changing name of script after using it in preload()
generates "Could not resolve script" error, recoverable only by reloading project
#92007
Labels
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: