Preparing for #GodotAddonJam? Don't forget to join! itch.io/jam/godot-addo…

And after you do, read this thread where I share some advices about making plugins for #GodotEngine 🧵👇
Let's start with Controls. Godot Editor is built using the same exact control nodes that you know and love from creating GUIs for your projects. You can do a lot with the UI of the editor if you are comfortable with controls. Editor is mostly containers, so practice those.
In case you need a refresher on building UI in Godot, the official docs have a pretty good set of articles docs.godotengine.org/en/stable/tuto…

And if you need a great example of plugin UI done right, that would be Dialogic by @Coppola_Emilio of course! github.com/coppolaemilio/…
Plugins are not the only way to make yourself new tools in Godot Editor. There is a lot you can improve by using tool scripts. Marking a script as a tool allows it to be loaded, and run, with the edited scene. This opens the doors for in-editor interactivity for your nodes.
One of the most amazing features made possible by tool scripts is your ability to dynamically adjust exposed properties, provide proxy values for child nodes, etc — all within the Inspector dock, with a live, responsive preview.
Why do you need to learn about this now? Well, plugins can add new custom nodes to your project! My go-to example of a good use of dynamically exposed properties is github.com/Arnklit/ShellF… by @KasperArnklit. Just take a look at the shell_fur_manager script!
It may look like magic now, but you can learn it from a sweet and relatively short tutorial by @duroxxigar

Dynamic properties is how I've made this:
Unfortunately, even with tool scripts you can't directly click and interact this way with your scenes in the editor viewport. That's because there is a better way to create viewport tools. You can of course draw on top of 2D/3D viewport. But also you can create custom gizmos!
Gizmos are spatial handles attached to various objects in your scenes. Gizmos let you rotate, scale, move, and otherwise adjust shapes and characters. And you can create your own using the officially exposed API. docs.godotengine.org/en/stable/tuto…
There are two must-have plugins that rely on custom gizmos which you can learn from. github.com/HungryProton/s… by @HungryProton and github.com/Arnklit/Waterw… by @KasperArnklit.

I also made one, github.com/pycbouh/godot-… for deformable road networks.
The plugin API is not always entirely helpful. But have I mentioned already that the editor is just a bunch of controls stacked on top of each other? You can use that to your advantage to hack into inaccessible parts of the UI by doing what can be called "tree wrangling".
Tree wrangling is a practice of using editor's node hierarchy to find a component you need and hack into it, instead of using a properly exposed API method to get that component directly. You use node child indices and class names to get around.
I don't want to scare you or teach you bad practices, but it's basically a necessity to do tree wrangling for a lot of more inventive Godot editor UI plugins. Most developers who create them have their own set of utils to help navigate the tree.
I'll give you practical examples with three of my own personal mini-plugins that I just made public:
github.com/pycbouh/godot-…
github.com/pycbouh/godot-…
github.com/pycbouh/godot-…
Okay, let's move on to the tools of the trade and what other plugins you can use to make your own — better and faster.
Starting with github.com/godot-extended… by willnationsdev. You will run into weird errors from plugin scripts hot-reloading. You will have to reload your entire plugin to get rid of them. With this tool you'll be able to do it very fast.
So you've succumbed to the dark ways of tree wrangling, but you still need to know where to find the node you are looking for. That's where github.com/Zylann/godot_e… comes in, an editor UI inspector by Zylann. Don't use the node names! But do use the node relation.
I think that it's very important to make your UI plugin fit into the editor theme. But here's a problem: Godot editor's theme can be deeply customized by the user, so you can never rely on predefined values if you want to achieve consistency.
What you should do is apply editor's existing styles, fonts, and colors to your controls. You can do it with a script on ready, and on theme changed notification if you are fancy like that. To know what you have at your disposal, you can use my explorer github.com/pycbouh/godot-…
That's about it! And if you ever get stuck, talk to Ducky! github.com/pycbouh/godot-…

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Yuri Sizov

Yuri Sizov Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(