godotengine / godotengine/godot
Renaming script externally breaks existing script assignment in Editor
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
v4.5.1.stable.mono.official [f62fdbde1]
### System information
Godot v4.5.1.stable.mono - Windows 10 (build 19044) - Multi-window, 4 monitors - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 4060 Ti (NVIDIA; 32.0.15.8097) - AMD Ryzen 9 7950X 16-Core Processor (32 threads) - 63.05 GiB memory
### Issue description
A node's link to an assigned script can error out when it's renamed outside the Godoe Editor (even when the UID files are renamed as well).
https://github.com/user-attachments/assets/92263dfd-f2e6-42b4-b25a-96311743a608
### Steps to reproduce
1. Create an empty project and a scene
2. Create a script and attach it to the root node
3. Save the scene
4. Rename the script (and its UID file) externally (either from an IDE or directly in OS' explorer), also compile the project if it's a C# script.
5. Move the focus back to the Godot Editor
6. Inspect the issue.
### Minimal reproduction project (MRP)
N/A
Contributor guide
Research direction
Start in the Godot Editor with the listed reproduction steps: attach a script, save the scene, rename the script and its UID file externally, then return focus to the editor. Compare the assigned script before and after the external rename, including the C# compile case. Done means the existing node assignment remains valid without an error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, godot
- Domain
- devtools, game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100