godotengine / godotengine/godot
Rename Resource-file issue
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
4.4-rc1
### System information
Godot 4.4-rc1
### Issue description
When I rename a script attached to a Resource, he doesnt alter the Resource file correctly. Tres files doesnt show a problem (maybe because they have not this line like a Resource has).
The first line always on a Resource hold the first name you gave the script. It gets not renamed. But it is important so he can find the Resouce correctly on certain things when you work in the editor.
(I created the Resources by clicking on the Resource-script, and Create New -> Resource. Sometimes I duplicated the Resource and just plugged on a new Resource-script. But not sure if this is relevant at all - renaming still not working on what ever approach i use to create new Resources. Even if they were once in sync after altering the resource file by hand (Even if i restarted the Editor after it). If I change the script name again, i have to alter the resource file every time i change the script file name)
`[gd_resource type="Resource" script_class="HERE THIS WILL NOT BE RENAMED CORRECTLY" load_steps=2 format=3 uid="uid://cqkcjstdq6atg"]`
### Steps to reproduce
Create a Resource and rename it.
### Minimal reproduction project (MRP)
-
Contributor guide
Research direction
Start by reproducing the issue in Godot 4.4-rc1: create a Resource from a Resource script, rename the script, and inspect the first line of the generated Resource file. Trace how the editor updates Resource files during script renames. Done means the `script_class` value changes correctly whenever the attached script is renamed.
Written by the indexing model from the issue text.
Assessment
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100