Built-In Script Naming - Godot workflow inconsistencies

Godot Version

4.4

I’m going to rant about using .gd scripts as Built-ins in the .tscn file.

So I select a node on the Scene Tab and click Attach Script.

  1. Problem: Built-in Script toggle does not auto-suggest Script Name
    A popup window appears, and now an immediate issue I see that the name field is empty when it should be the name of the node.

Let’s continue, I’m too lazy to type-in the Name for the Built-in-Script, which will soon cause us a lot of problems.

Here we have it, a confusingly named attached built-in script

After clicking Create button, this is what you are usually greeted with.


It shouldn’t be named this way, the name is already soon-to-be-very-long.
It shouldn’t start with the scene name (game_world.tscn::), instead the name should imply that this Built-in Script belongs to StaticBody3D Node.

The game_world.tscn should be presented as a side-note.

So in my mind I think it should be something like this by now:
StaticBody3D.gd (game_world.tscn)

Instead of:
game_world.tscn::

Another annoyance: Does not save script after clicking the create button

Now let’s take a step back.
Why does Create button does not create the built-in script? I mean it creates, but it’s not saved. You would expect your “creation” to actually exist in the world after you create it! IT’S A BUILT-IN Script, why do we need re-confirm to save a built-in script?

Finally I saved my precious built-in script.

And now my built-in script immediately with a garbage looking name.


I mean it’s insane how unfriendly this is. Who wants to read names like these?

Let me rename this built-in script! - whoops there is no such functionality

So how do we even rename this “garbage named” built-in script, if there is no rename button in the context menu?

1 Like

You can modify the tscn file in a text editor. But i agree there are some fixes needed. You can also supply a class_name and it parses, but doesnt work at run time with built-in scripts. (At least 4.3 is bugged like this)

I would raise an issue on github

1 Like

You can rename it by opening the script in the inspector and changing the Resource.resource_name

2 Likes