Godot normally loads .NET, now .NET loads Godot.
2dog packages Godot as a library (a slightly modified libgodot) hostable by .NET applications. Doing it like this enables browser publishing, ordinary dotnet tooling, and many automations like unit testing.
Pre-built native libraries are available for speed and convenience.
Full documentation at 2dog.dev.
2dog preserves your existing game content, and there is no tool installation step. Please make backups, but most of its changes are optional additions, not modifications.
dnx 2dog convert path/to/MyGame
cd path/to/MyGame
dotnet run --project MyGame.2dogInstall and use the project template:
dotnet new install 2dog
dotnet new 2dog -n MyGame
cd MyGame
dotnet run --project MyGame.2dogIn either case, the familiar Godot workflow still works:
godot-mono --editor . # or Godot_v4.7.1-stable_mono_win64.exe, etc.The generated .NET app can also be published to browser-wasm (HTML5 / Web Browser)
dotnet workload install wasm-tools
dotnet tool install --global dotnet-serve
dotnet publish MyGame.web
dotnet serve --directory MyGame.web/AppBundleSee Web / Browser for the development loop, deployment options, and current limitations.
2dog mainly adds subdirectories with additional "hosts" that can run your Godot project. These use libgodot instead of the normal export templates or editor executable.
MyGame/ Godot project and solution root
βββ project.godot Scenes, scripts, assets, project settings
βββ MyGame.csproj Godot C# game assembly
βββ MyGame.2dog/ Desktop .NET host
βββ MyGame.web/ Browser WebAssembly host
βββ MyGame.tests/ Headless xUnit host
The nested hosts carry .gdignore, so Godot ignores them. The game project
remains clean and editor-friendly while each host gets its own entry point and
dependencies.
- .NET SDK 10.0 or later, with the
wasm-toolsworkload - Godot 4.7.x official .NET editor only when you want to edit scenes visually
- Supported build platforms:
win-x64,linux-x64, andosx-arm64 - Supported RIDs:
win-x64,linux-x64,osx-arm64,browser-wasm - Packages available on NuGet and GitHub
Want to work on 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 demo with dotnet run --project demo/demo.2dog and the tests with
dotnet test twodog.tests.
We've got a dedicated channel for 2dog, say hello!