Introduction to editor development

On this page, you will learn:

  • The design decisions behind the Redot editor.

  • How to work efficiently on the Redot editor's C++ code.

This guide is aimed at current or future engine contributors. To create editor plugins in GDScript, see Making plugins instead.

See also

If you are new to Redot, we recommended you to read Redot's design philosophy before continuing. Since the Redot editor is a Redot project written in C++, much of the engine's philosophy applies to the editor.

Technical choices

The Redot editor is drawn using Redot's renderer and UI system. It does not rely on a toolkit such as GTK or Qt. This is similar in spirit to software like Blender. While using toolkits makes it easier to achieve a "native" appearance, they are also quite heavy and their licensing is not compatible with Redot's.

The editor is fully written in C++. It can't contain any GDScript or C# code.

Directory structure

The editor's code is fully self-contained in the editor/ folder of the Redot source repository.

Some editor functionality is also implemented via modules. Some of these are only enabled in editor builds to decrease the binary size of export templates. See the modules/ folder in the Redot source repository.

Some important files in the editor are:

Editor dependencies in scene/ files

When working on an editor feature, you may have to modify files in Redot's GUI nodes, which you can find in the scene/ folder.

One rule to keep in mind is that you must not introduce new dependencies to editor/ includes in other folders such as scene/. This applies even if you use #ifdef TOOLS_ENABLED.

To make the codebase easier to follow and more self-contained, the allowed dependency order is:

  • editor/ -> scene/ -> servers/ -> core/

This means that files in editor/ can depend on includes from scene/, servers/, and core/. But, for example, while scene/ can depend on includes from servers/ and core/, it cannot depend on includes from editor/.

Currently, there are some dependencies to editor/ includes in scene/ files, but they are in the process of being removed.

Development tips

To iterate quickly on the editor, we recommend to set up a test project and open it from the command line after compiling the editor. This way, you don't have to go through the project manager every time you start Redot.