Godot: Change "Add to script" option to allow selecting scripting language option.

Created on 4 Aug 2016  路  8Comments  路  Source: godotengine/godot

Currently, if you want to select which language option you want to use, you have to do it from the "Create Node Script" popup ("Add Script" from the context menu on the scene panel).

What I would like to see is that it brings up a further sub-menu with a list of available scripting options:
context_menu_addition png

Which then calls up the "Create Node Script" dialogue as normal, _except that your scripting option is selected instead of whatever the default option is_:
takes_to_dialogue png

I hope this makes sense?

discussion enhancement junior job editor usability

Most helpful comment

IMO, submenu would annoy me.
I prefer to Language type stays as last selection on Create Node Script popup window.

All 8 comments

Here is a probably better idea -- have it configurable in editor/project settings which one you want by default.

IMO, submenu would annoy me.
I prefer to Language type stays as last selection on Create Node Script popup window.

I agree with @volzhs, the current behaviour is good enough for me.

I don't think an editor or project setting would be useful either, as typically users should use both GDScript and VisualScript for different use cases. It will be most likely unpractical to make a full game only with VisualScript, so setting it as project wide setting would make little sense IMO.

The only thing I would change is improve the Create Node Script popup itself. As far as I know the Class Name field is useless.

@akien-mga It would be used when we get C#, so...

It wouldn't still make sense with C#. Unity uses a submenu, but they create the script directly and let you rename it in their file system.
Also you create the scripts directly from Unity's file system, so you don't need to choose a path.
Maybe an option to create scripts from the File System dock could work...

If we go with @volzhs do you think last selection should be stored somewhere on disk to persist through different sessions?
If yes, is there already a file where similar kind of stuff are stored or do we create a new file in ~/.godot?

@lordadamson Project specific editor settings are stored in ~/.godot/config/_project_uuidname_, but looking through the files I have there, it doesn't seem like there's one suitable for this information.
So yeah, I guess you'd just create a new file there.

Okay at least I know now where to place the new file.

Was this page helpful?
0 / 5 - 0 ratings