You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I always have to write my class_name myself, so I thought a setting to auto-generate class name from the script file name, or at least to manually input it at script file creation, would be nice.
I found the field I wanted in the Create Script popup as "Class Name", except the content is filled with N/A no matter what. It doesn't auto-fill from file name, and I cannot edit the field manually either.
I'm using Godot without C#. Is it only active in C#? Either way, it is still useful in GDScript to auto-fill class_name at the top.
First I'd like to see the expected behavior... If it's only meant for manual fill, then once it's fixed, I will submit a suggestion to go further and auto-fill from file name.
And forgive me if it was already reported. Turns out that searching "N/A" is super hard when so many issues set "Minimal reproduction project" as "N/A"... including this one!
Steps to reproduce
Create a new script
In the Create Script popup, note how Class Name is "N/A".
Try to edit the field, to no avail.
Edit the path, but Class Name is still not updated.
Minimal reproduction project
N/A
The text was updated successfully, but these errors were encountered:
I'm using Godot without C#. Is it only active in C#? Either way, it is still useful in GDScript to auto-fill class_name at the top.
Indeed, this field is only used in C#. It could be made usable from GDScript too, with the default value (empty string) resulting in no class name.
I wouldn't do automatic class_name generation though, as having too many class names tends to cause issues. For instance, GDScript lacks namespaces, and having lots of class_names can decrease editor performance. As a result, you should only create named classes in GDScript when you actually need them.
OK, so in this case, just a toggle to enable class_name generation, or considering empty as no class_name and filling something as defining a custom class_name, would work.
Sounds like it would be a totally different field than for C#. Should it become a proposal then?
Sounds like it would be a totally different field than for C#. Should it become a proposal then?
I'd prefer it being the same field, just with the field's default value changing depending on the currently selected language (and empty values being allowed in GDScript).
Godot version
v4.0.stable.official [92bee43]
System information
Linux Ubuntu 22.04 with Unity desktop
Issue description
I always have to write my class_name myself, so I thought a setting to auto-generate class name from the script file name, or at least to manually input it at script file creation, would be nice.
I found the field I wanted in the Create Script popup as "Class Name", except the content is filled with N/A no matter what. It doesn't auto-fill from file name, and I cannot edit the field manually either.
I'm using Godot without C#. Is it only active in C#? Either way, it is still useful in GDScript to auto-fill class_name at the top.
First I'd like to see the expected behavior... If it's only meant for manual fill, then once it's fixed, I will submit a suggestion to go further and auto-fill from file name.
And forgive me if it was already reported. Turns out that searching "N/A" is super hard when so many issues set "Minimal reproduction project" as "N/A"... including this one!
Steps to reproduce
Minimal reproduction project
N/A
The text was updated successfully, but these errors were encountered: