Attach script dialog now respects user case choice - #79303
Conversation
when attaching a new script, the script filename path will now respect the choice of case for file names
|
I implemented this in #78119 as well, but my approach adds a new setting which also allows for auto-detecting based on language (so C# uses PascalCase but GDScript uses snake_case). |
|
Nice! I was also wondering about the setting. My thought was that it might be ideal to rename the current "scene name casing" setting to "file name casing" or similar, and let it apply for both scenes and scripts? And actually probably for any other file that the editor creates. Or is it desirable to treat script names differently? |
Differently from the chosen scene file name convention? Yes definitely, since many language's IDEs/linters will complain about incorrect file naming schemes if they don't match the language's conventions. Whether the auto-detection behavior in my implementation should be "the default / the only way it works", or an editor setting, is up to debate. I personally followed the superseded PR there, but it's not strictly necessary to go against conventions. |
|
Good point. Then your work on #78119 seems more appropriate! |
In the "Attach Node Script" dialog, the suggested file name will now respect user choice of case, as per the scene_name_casing setting.
This makes the naming behaviour consistent even when attaching a script to a new scene that wasn't already saved to any file path.
Resolves #39441 ?