Editor plugin types
Choose panels, a main workspace, or another extension point.
Choose the smallest extension point for the task. A custom panel does not require an importer, and an Inspector customization does not require a new main screen.
| Task | Type / mechanism |
|---|---|
| Add menus/panels and manage registrations | EditorPlugin with [Tool]. |
| Run script logic during editing | [Tool] and Engine.IsEditorHint(). |
| One manually launched editor operation | EditorScript._Run(), distinct from plugin lifecycle. |
| Customize property presentation | EditorInspectorPlugin, registered through EditorPlugin. |
| Import a custom format | EditorImportPlugin. |
| Add a 3D gizmo | EditorEntity3DGizmoPlugin. |
| Create a dedicated workspace | EditorDock with MainScreen slot. |
Start with the panel/menu example: register in _EnterTree() and remove registrations/owned objects in _ExitTree(). Reenabling must produce exactly one panel and handler.
If code changes the edited hierarchy, separately design editor UndoRedo and saved-object ownership. The example reads data, so it creates no scene edits requiring undo.
The main-screen example uses current AddDock() and EditorDock.DockSlot.MainScreen: workspace. It does not require the older _HasMainScreen() / _MakeVisible() scheme.
Two EditorDock placements, menu handling, reenablement, and cleanup were executed. EditorScript, Inspector, importers, gizmos, scene edits, and visual rendering were not tested here; the table explains API purpose rather than proving every extension type.