Creating custom inspectors in Godot C# more easily

Creating custom inspectors in Godot C# more easily

We found ourselves a bit frustrated (and surprised) when discovering how much it takes hooking up custom inspectors or drawers in Godot, at least in C# (where you have to also recompile everything). So we fixed it. And it's publicly available on GitHub!

ℹ️
P.S. We wrote this article on Godot 4.4. We hope to spark the conversation and to see improvements in the future (if we're not the only ones) directly in the editor by the engine contributors!

What's the deal

The issue

The Godot way of doing things forces you to create a plugin anytime you want to customize the Editor, since letting it know that a custom inspector, dock or drawer exists is only available through methods of the EditorPlugin class.

Its a tedious process that forces you to either create a custom EditorPlugin for each "group" of classes that work together (so that if one breaks, other groups are still intact in the editor), or have one big giant class where you have to manually add all your custom inspectors etc. one after another.

The solution

No more endless wrappers! You can now inherit from specific classes (like "CustomInspectorBase") and our addon will take care of scanning them automatically and customize the editor accordingly.

One plugin that automatically detects Inspectors and lets Godot know about it. No extra dependencies (simply delete the Inspector class and it's removed from anywhere, or create it and it's added automatically).
💡
This should be possible in GDScript in the future too, but a C++ extension is probably required for scanning classes/decorators. Help us and contribute to the repo!

Installing the plugin

To download and install the plugin:

  1. Clone our repository (or just download the zip files)
  2. Copy the addons folder directly into your Godot project.
  3. ⚠️ Remember to build your project (or Godot still wouldn't be able to know about the addon)
  4. Enable the plugin in Project -> Project Settings -> Plugins -> Editor Utils.
👍
The addon is ready! (If you have some errors and Godot said the plugin is disabled, just recompile 🙄 and then re-enable the plugin.)

Hooking up your first custom inspector

Attributes

After this.. you're set! As an example, let's say we want a "ReadOnly" attribute that shows the value in the Editor, but is not modifiable.

0:00
/0:05

We can declare it in a Node like this:

public class ReadOnlyAttribute : Attribute{ }

[Tool]
public partial class ExampleNode : Node
{
    [Export] int thisIsAnInt;
    [Export] bool thisIsABoolean;
    [Export, ReadOnly] float thisIsAFloat;
}

And the actual implementation becomes:

using System;
using Godot;
using Febucci.EditorUtils;

#if TOOLS
public partial class ReadOnlyDrawer : AttributeDrawerBase<ReadOnlyAttribute>
{
    protected override Control GetPropertyEditor(Variant.Type type, string name, PropertyHint hintType, string hintString, PropertyUsageFlags usageFlags, bool wide, object value)
    {
        return new Label() { Text = $"{name}: {value.ToString() ?? "null"}" };
    }
}
#endif

Node Inspectors

You can go further and modify the entire inspector of a Node. The process is similar, just inherit from "CustomInspectorBase<YOURNODE>" and you can start modifying the Inspector right away.

In conclusion

Have fun! The system can be expanded with more hooks and similar (for example auto-adding scenes to the Inspector Dock) so we'll keep you updated once we're able to do so. You find everything in the repository, and it's MIT licensed so you can use it freely in your games/tools and similar.

Thank you so much for reading and see you on the next post!

Thanks for reading! ❤️

Let us know what you think! We're a small team and we are loving what we do, so any feedback is appreciated ❤️ You can also consider joining the newsletter (either weekly or monthly, we care deeply about it) and never miss our new posts. Cheers!

✦  Join the newsletter Already have an account? Sign in

Comments

More Posts

The Best Gamescom so far! August 2025

The Best Gamescom so far! August 2025

We just attended Gamescom (and devcom) this year and they were the best one for us so far!! Here's a short update about the general mood and more thoughts.

I'm giving a talk at devcom 2025!

I'm giving a talk at devcom 2025!

I am giving a talk at devcom 2025 about the many lessons I have learned while developing and selling Text Animator for Unity! I'll also make a post here in the future... read more!

Resuming content and tools!

Resuming content and tools!

We are ready to post new content and tools!! Text Animator for Godot, for Unity 3.X, a game in development and more.