This page documents the Editor Inspector system: the EditorInspector control, the EditorProperty base class for individual property editors, the EditorInspectorPlugin extension mechanism, and the EditorResourcePicker control used for Resource-type properties. The inspector is the primary interface through which the editor exposes an object's properties for viewing and editing.
For information about the editor's plugin system that registers inspector plugins, see EditorPlugin System. For the broader editor orchestration that determines which object is currently selected, see EditorNode.
The inspector system is a layered architecture. EditorInspector manages the overall view of an object's properties, delegating individual property display to EditorProperty instances. Plugins implemented via EditorInspectorPlugin can intercept this process to inject custom controls or replace built-in property editors.
Architecture diagram: Inspector class relationships
Sources: doc/classes/EditorInspector.xml doc/classes/EditorProperty.xml doc/classes/EditorInspectorPlugin.xml doc/classes/EditorResourcePicker.xml
EditorInspector (inherits ScrollContainer) is the top-level control that populates itself with property editors for a given Object. It is available in the editor's main Inspector dock via EditorInterface.get_inspector().
| Method | Description |
|---|---|
edit(object) | Populates the inspector for the given object. Pass null to clear. |
get_edited_object() | Returns the object currently being edited. |
get_selected_path() | Returns the path of the currently selected property. |
instantiate_property_editor(...) | Static; creates a standalone EditorProperty for use in plugin UI. |
The inspector interprets property metadata to build a hierarchy automatically:
highlighting/gdscript/node_path_color): Creates nested sections for each /-delimited segment.PROPERTY_USAGE_GROUP: Groups subsequent properties whose names start with the group's hint string into a collapsible top-level section.PROPERTY_USAGE_SUBGROUP: Creates a second-level section inside the current group.PROPERTY_USAGE_CATEGORY: Creates a category separator (typically used per class in the inheritance chain).Grouping diagram: How property usage flags map to inspector sections
Sources: doc/classes/EditorInspector.xml
| Signal | When emitted |
|---|---|
edited_object_changed | The inspected object is replaced. |
property_edited(property) | A property value was modified. |
property_keyed(property, value, advance) | A property was keyed for animation. |
property_selected(property) | A property row was selected. |
property_toggled(property, checked) | A boolean property was toggled. |
property_deleted(property) | A property was removed. |
resource_selected(resource, path) | A resource-type property was activated. |
object_id_selected(id) | An Object ID "Edit" button was pressed. |
restart_requested | A changed property requires a restart (Project/Editor Settings only). |
Sources: doc/classes/EditorInspector.xml
EditorProperty (inherits Container) is the base class for every individual property row in the inspector. Built-in Godot types have their own EditorProperty subclasses (e.g., for bool, float, Vector3, Color), and plugins can define additional ones.
Sources: doc/classes/EditorProperty.xml doc/classes/EditorInspectorPlugin.xml
| Method | Purpose |
|---|---|
_update_property() | Called to refresh the editor widget from the current property value. Must be overridden. |
_set_read_only(read_only) | Called when the read-only state changes. Used to enable/disable controls. |
| Property | Type | Meaning |
|---|---|---|
label | String | Display name shown in the label half of the row. |
read_only | bool | Disables editing. Triggers _set_read_only. |
keying | bool | Shows the "key" button for animation keying. |
checkable / checked | bool | Enables a checkbox on the label. |
deletable | bool | Shows a delete button. |
draw_warning | bool | Highlights the row in the warning color (used for editable children). |
name_split_ratio | float | Ratio of space given to label vs. editing widget (default 0.5). |
use_folding | bool | Enables folding of the property section. |
After the user modifies a value, the EditorProperty must call emit_changed:
emit_changed(property: StringName, value: Variant, field: StringName = "", changing: bool = false)
field distinguishes sub-fields of compound types (e.g., "x" for a Vector3.x change).changing = true signals that the change is ongoing (drag), suppressing a full inspector refresh.| Signal | Description |
|---|---|
property_changed(property, value, field, changing) | Emitted on value change. Use emit_changed to trigger this; do not emit directly. |
property_keyed(property) | User clicked the key button. |
property_keyed_with_value(property, value) | User keyed with the current value. |
property_checked(property, checked) | Checkbox toggled. |
property_deleted(property) | Delete button pressed. |
property_pinned(property, pinned) | Property marked/unmarked to always save. |
property_favorited(property, favorited) | Property added/removed from favorites. |
property_overridden | A project override was requested. |
multiple_properties_changed(properties, value) | Multiple properties modified simultaneously. |
resource_selected(path, resource) | A sub-resource was opened. |
object_id_selected(property, id) | An Object ID reference was clicked. |
selected(path, focusable_idx) | Property row was selected. |
Sources: doc/classes/EditorProperty.xml
EditorInspectorPlugin (inherits RefCounted) is the extension point for customizing inspector behavior. It must be registered with EditorPlugin.add_inspector_plugin() to take effect (and removed with remove_inspector_plugin() on cleanup).
When the inspector loads an object, it iterates over all registered EditorInspectorPlugin instances in registration order and calls the following virtual methods:
| Callback | Called when |
|---|---|
_can_handle(object) | Before anything; return true to participate. |
_parse_begin(object) | Once, at the start of parsing. |
_parse_category(object, category) | At each category boundary. |
_parse_group(object, group) | At each group/subgroup boundary. |
_parse_property(...) | For each property. Return true to suppress the built-in editor. |
_parse_end(object) | Once, after all properties. |
Inside any of the callbacks above, these methods enqueue controls to be added to the inspector:
| Method | Effect |
|---|---|
add_custom_control(control) | Inserts an arbitrary Control. |
add_property_editor(property, editor, add_to_end, label) | Inserts an EditorProperty for a named property. If add_to_end is true, appended after other editors for the same property. |
add_property_editor_for_multiple_properties(label, properties, editor) | Inserts an EditorProperty that edits several properties at once. |
Sources: doc/classes/EditorInspectorPlugin.xml
EditorResourcePicker (inherits HBoxContainer) is the standard widget used inside property editors that hold a Resource-type value. It renders a preview button for the resource and provides a context menu with options such as New, Load, Save, Edit, and Clear.
| Member | Type | Purpose |
|---|---|---|
base_type | String | Comma-separated list of accepted Resource subtype names. |
edited_resource | Resource | The currently held resource value. |
editable | bool | Whether the user can change the value. |
toggle_mode | bool | Main button acts as a toggle. Use set_toggle_pressed() to set state. |
Two virtual methods let subclasses extend the context menu:
| Method | Purpose |
|---|---|
_set_create_options(menu_node) | Override to replace "New …" items with custom options. menu_node is a PopupMenu. |
_handle_menu_selected(id) | Handle the custom menu items added by _set_create_options. Return true if handled. |
| Signal | Description |
|---|---|
resource_changed(resource) | The edited resource value was replaced. |
resource_selected(resource, inspect) | User activated the resource. If inspect is true, came from "Edit"/"Inspect" menu. |
Sources: doc/classes/EditorResourcePicker.xml
The following diagram shows the full round trip from user input to an object property being updated.
Sources: doc/classes/EditorProperty.xml doc/classes/EditorInspector.xml
The typical workflow for a plugin that adds a custom property editor:
Define an EditorProperty subclass. Override _update_property() to read from get_edited_object().get(get_edited_property()) and refresh the widget. Call emit_changed(...) when the user changes the value.
Define an EditorInspectorPlugin subclass. Override _can_handle() to filter by object type. Override _parse_property() to detect the target property and call add_property_editor(name, my_editor_instance).
Register the plugin in your EditorPlugin._enter_tree() via add_inspector_plugin(my_plugin) and unregister it in _exit_tree() via remove_inspector_plugin(my_plugin).
Sources: doc/classes/EditorInspectorPlugin.xml doc/classes/EditorProperty.xml
Refresh this wiki
This wiki was recently refreshed. Please wait 2 days to refresh again.