Some questions regarding creating tools

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By lowpolygon

I am in the process where it might help if I create some tools to do some mundane work.
I looked thru some tutorial on yourtube which shows some basics on tool creation.
And here are my questions

  1. Is it possible to create a top menu item and all I have to do is click on the menu item instead of opening the tool script and run
  2. Is it possible to make gui works in editor mode ?
    3 If gui cannot work in editor mode, is it possible to add something like a button / slider kind of thing to inspector?
1 Like
:bust_in_silhouette: Reply From: johnygames
  1. What you are referring to is called editor scripting and it is done via a class that is called EditorScript. What you need instead is to create a Pugin via the EditorPlugin class. This enables you to add gui elements to the Godot editor. There are a few tutorials about it on YouTube. 2) So yes it is possible. You could create some basic gui using EditorScript too, but I 've read somewhere that you cannot listen to user input (button presses) . 3) If you decide to go for EditorScript, which is a bit simpler, you could create a slider or an export variable and have them react to changes from within the editor. You have to use the setget keyword when you define the slider or the variable.

Thank you very much for answering, I will look into editorscripting and editorplugin

lowpolygon | 2020-01-08 23:14

1 Like