- Edited
Hi, Unity refugee here. I'm still learning Godot so forgive me if I am unaware of any existing features during this suggestion. Over the many years using Unity, hands down the best asset I ever purchased was Sirenix's Odin Inspector. Even if I never directly used it in code in some projects, it provided many QOL inspector features out of the box. It is a really big, feature packed asset, to the point where I must admit that there are still many tools in there that I never ended up using. There are a few editor windows included with Odin that are not related to the inspector (most notably the Static Inspector) but I will not be talking about those features here for the sake of simplicity.
Odin, written in and for C#, approaches the problem of custom editors by using attributes on properties, much the same way you use the [Export] attribute with PropertyHint in Godot currently. PropertyHint is a good start, but I find the reuse of the same attribute with optional enum and string parameter to be confusing, clunky, and not easily extendable by devs (AFAIK). Odin's approach, instead, is to provide many attributes, which can be mixed and matched on one or more properties to get a desired result. (Basic exposure to the inspector in unity is done by the field being public)
Some notable Odin Inspector attributes I'd like to see in Godot, in no particular order:
- ChildGameObjectsOnly - object or component must be attached to this object or its children
- MinValue and MaxValue - This is here because I could not get Export(PropertyHint.Range, "1,or_greater") to work. IDK if this is currently supported in Godot.
- Required - Displays error box if property is null
- Button - Adds any method as a button.
- SuffixLabel - Label yer units! Meters? Pixels? Inches?
- FoldoutGroup - Organize yer properties!
- EnableIf and DisableIf - Property is readonly if condition is not met
- InlineEditor - Entire property is drawn as a dropdown instead of as a reference you have to navigate to
The implicit "Serialize Anything" feature, as they have coined it: No matter what classes you write, it can be displayed in the inspector, including system classes and collections. Not an easy feat to reproduce, I'm sure, but extremely powerful. Reproducing this in Godot would be a challenge due to existing implemented design principles. As a self called systems programmer, this feature is godly. Lists, dictionaries, interfaces, delegates, pretty much anything you can think of can be exposed to the inspector to some level. It's been my opinion for years that Unity should acquire Odin and make it a default part of the unity engine, like they did with the ProBuilder toolset several years ago.
Closing thoughts:
I have done some searching and have found several people asking about how to reproduce various Odin features in Godot, besides myself. There is a demand for better and easier custom tooling. I believe this demand only increases with the larger a project gets, both in complexity and in number of team members with varying levels of experience. I hope that at least a few of these features can be adopted into Godot.