QueenOfSquiggles / godot-mono-better-inspector

Making the Godot Editor better for C# projects with the use of Attributes, like how Unity does it!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

godot-mono-better-inspector

Making the Godot Editor better for C# projects with the use of Attributes, like how Unity does it!

Integrated vs Custom

Custom is the default, but in some cases you may prefer to use Integrated.

Integrated

  • "well integrated" with the default editor.
  • Property shows up where expected, as it always does.
  • Customization is quite limited.

Custom

  • "highly customizable"
  • doesn't play well with the built in functions
    • no animation keying support (YET)

Attribute Reference

Note that any export variable that does not have an attribute from this plugin will be handled by the default Godot systems. Only use this were you want/need it.

C#

Attibutes in C# are added with [AttributeName]. For example, the export attribute is what it used for [Export] variables. I defined a large set of custom attributes that allow for some extra functinality.

Attribute Params Description
Tooltip (string) or (string, string, string ...) loads the text into the tooltip. For custom inspectors, this is full BBCode enabled, integrated is restricted to a few BBCode options. Also if the params option is used, each string is treated as a line and line breaks are inserted between each.
UseIntegrated _ forces use of the integrated
BottomInspector _ forces the editor to use a more vertical display mode. Gives more space for sliders
ReadOnly _ forces the inspector display to make the variable read-only, which prevents making edits while still displaying the value
CustomLabel (string) Uses a custom label for the variable instead of the default name.

(list is incomplete)

GDscript

Attributes in GDscript are generated by the plugin by parsing the source code and finding the block of double hash comments. "##" So adding one of these would go as :

## this will be a tooltip
## @label this will be a custom labe;
export var someInt := 1

About

Making the Godot Editor better for C# projects with the use of Attributes, like how Unity does it!


Languages

Language:C# 99.3%Language:GDScript 0.7%