Skip to content

WinForms ​

The WinForms host embeds Godot in a Windows Forms window with a Pause/Resume button. It runs on Windows.

Illus. Diego Rago: a white anthro dog in a hacker hoodie and glasses walking their blue godot robot dog

Godot reports Engine.is_embedded_in_editor() as true for this host. If a script checks this value, make sure that it also works in this host.

Use It ​

Run these commands from your Godot project directory:

bash
dnx 2dog add --winforms
dotnet run --project MyGame.winforms

Customize It ​

Edit the generated form to add controls. Its UI thread runs Godot frames, so event handlers can access the scene tree through _engine.Tree. See the showcase host for an example.

Controls cannot overlap the game window. Use Avalonia or Qt Quick for overlays or a cross-platform UI.

See WinForms Configuration for build and publish settings.

2dog is Free and Libre Open Source under the MIT License.
2dog is not affiliated with or endorsed by the Godot Foundation.
Godot is licensed under the MIT License; the Godot logo is by Andrea Calabró under CC BY 4.0. @icons made by Voxy under the MIT License.
Continuous Integration compute graciously supported by Blacksmith.