Description
Tested versions
v4.4.1.stable.steam [49a5bc7]
System information
Windows 11 - v4.4.1.stable.steam [49a5bc7]
Issue description
When you attach a script that already exist, but the file name casing does not match, a new file is created that inherits the original script code.
For example you have:
MyScript.gd file which has class_name MyScript
You attach new script to a node and name it myscript.gd.
The editor says you LOAD an existing script and duplicates the existing code, but
the editor handles this script as unique > you have both MyScript.gd and myscript.gd in the code editor.
In this case you get an error (in the myscript.gd file) that class MyScript hides a global script class.
Steps to reproduce
Create a MyScript.gd file.
in the scene editor, create any kind of node and attach new script to it. set the path to be the same as MyScript.gd and set the name to have different casing. For example myscript.gd.
attach the new script.
code editor should have the contents of MyScript.gd but the file is treated as unique script.
Minimal reproduction project (MRP)
I hope steps to reproduce are simple enough