2dog is available fully precompiled from NuGet.org and as GitHub Releases. (no need to compile this repo)
2dog packages Godot as a library (a slightly modified libgodot)
that your .NET application hosts. Keep your Godot project exactly as it is, and run it on the desktop, in the
browser, inside a .NET UI, or under xUnit and NUnit with a real Godot engine, all with dotnet and your IDE.
π Full documentation: 2dog.dev
- Your Godot project stays yours. Scenes, scripts and assets stay where they are; keep editing them in the official Godot .NET editor.
- Godot C# on the web.
dotnet publishyour C# game to WebAssembly, with optional WebXR and experimental multithreading. More - Real-engine tests. xUnit and NUnit fixtures run headless in CI, with Godot-aware assertions for signals, frames and deferred deletion; Godot errors fail tests. GDScript tests run through gdUnit. More
- Godot inside .NET UIs. Embed the engine in Avalonia, Blazor, WinForms, WinUI 3 or MAUI, with native controls over the game.
- A C# REPL in your running game. Inspect and change live nodes from a terminal or a coding agent.
- One tool for setup and upkeep.
2dog new,add,doctorandupdatescaffold hosts, diagnose build problems and keep package versions in step. More - No engine compile. Prebuilt natives for Windows, Linux, macOS, WebAssembly and Android come from NuGet.
- Automatic import. Changed resources are imported during the build; no
godot --importstep. - Plain .NET projects. Each host is a normal project in your solution: build, debug and publish it like any other, including self-contained and NativeAOT desktop builds.
The tool adds each host as a small nested project with its own .NET entry point:
| Host | What it does | 2dog add flag |
|---|---|---|
| Desktop | Run Godot from your own Main on Windows, Linux and macOS. |
--generic |
| Web | Publish your Godot C# game to the browser. | --web |
| WebXR | Take your game into browser VR and AR. | --webxr |
| Avalonia | Embed Godot in a cross-platform desktop UI. | --avalonia |
| Blazor | Put Godot in a Blazor page and drive it from Razor components. | --blazor |
| WinForms | Embed Godot in a Windows Forms application. | --winforms |
| WinUI 3 | Embed Godot in a Windows App SDK application. | --winui |
| MAUI | Embed Godot in a MAUI page on Windows or Android. | --maui |
| Android Β· experimental | Build an APK with dotnet publish. |
--android |
| xUnit | Test your game with xUnit. | --xunit |
| NUnit | Test your game with NUnit. | --nunit |
| gdUnit | Run GDScript gdUnit tests with dotnet test. |
--gdunit |
| C# REPL | Explore and change your running game from a prompt. | --repl |
The showcase runs one Godot project across desktop, web, UI and Android hosts.
You need the .NET 10 SDK. The Godot editor is optional and only needed to edit scenes visually.
Existing Godot project: from the folder with project.godot, pick hosts and run the desktop one.
cd path/to/MyGame
dnx 2dog add
dotnet run --project MyGame.2dogNew project:
dnx 2dog new MyGame
cd MyGame
dotnet run --project MyGame.2dogMyGame stands for your project's name. Run dnx 2dog add again at any time to add another host, for example:
dnx 2dog add --web --xunit
dotnet publish MyGame.web # game and index.html land in MyGame.web/AppBundle/
dotnet test MyGame.xunitEach host is a nested folder that Godot ignores, so your project looks like this:
MyGame/
βββ project.godot your scenes, scripts and assets, unchanged
βββ MyGame.csproj your Godot C# game
βββ MyGame.slnx
βββ MyGame.2dog/ desktop host
βββ MyGame.web/ browser host
βββ MyGame.xunit/ tests
Continue with the getting started guide, then the page for each host you added.
Later, dnx 2dog update moves the project to new 2dog releases and dnx 2dog doctor finds and fixes problems.
- .NET SDK 10.0 or later on
win-x64,linux-x64orosx-arm64 - Godot 4.7, with the official .NET editor for visual editing
- Published builds:
win-x64,linux-x64,osx-arm64andbrowser-wasm; Android arm64/x64 is experimental - Web, WebXR and Blazor hosts need the
wasm-toolsworkload; Android needs theandroidworkload, the Android SDK and JDK 17.2dogoffers to install the workloads, and desktop and test builds need neither.
Packages are on NuGet and GitHub.
The main ones are 2dog (the tool), 2dog.templates
(the dotnet new templates) and 2dog.engine (the library); the tool adds the rest to your hosts.
π¦΄
- Forked
libgodotfeatures/fixes consist of similar amounts of human-written and machine-written code - Commits/PRs are reviewed & gated by both humans and machines (over 90%/90%) and signed by humans
- .NET Host applications are mostly human-written, while boilerplate assets (e.g. XAML) are mostly machine-written
- Configurations, tools, smoke tests, CSS, MSBuild XML, and CI workflows are overwhelmingly LLM-maintained
- Documentation aims to be human-authored, but new feature docs are generated and later gradually rewritten
- Releases on NuGet use Trusted Publishing and may only be invoked via direct human interaction
Want to contribute, modify, or add to 2dog itself? Clone with submodules, then build the native and .NET packages:
git clone --recursive https://github.com/outfox/2dog
cd 2dog
uv run poe build-allRun the showcase with dotnet run --project demos/showcase/showcase.2dog and the tests with
dotnet test twodog.tests.
The repository contains symlinks. On Windows, enable
Developer Mode
and run git config --global core.symlinks true before cloning. To repair an
existing clone, run git config core.symlinks true, then
git checkout -- demos/showcase/fps_counter.tscn.
Continuous Integration compute graciously supported by RunsOn.
We have a dedicated channel for 2dog. Come say hello!