๐ฎ Full Godot Power
Access the complete GodotSharp API - scenes, physics, rendering, audio, input - everything Godot can do.
Godot is! Yes it is!
Start & control Godot from .NET code.
using twodog;
using var engine = new Engine("myapp", "./project");
using var godot = engine.Start();
// Load a scene
var scene = GD.Load<PackedScene>("res://game.tscn");
engine.Tree.Root.AddChild(scene.Instantiate());
// Run the main loop
while (!godot.Iteration())
{
// Your code here - every frame
}using twodog.fixture;
using twodog.xunit;
[Collection<GodotHeadlessCollection>]
public class GodotSceneTests(GodotHeadlessFixture godot)
{
[Fact]
public void LoadScene_ValidPath_Succeeds()
{
var scene = GD.Load<PackedScene>("res://game.tscn");
var instance = scene.Instantiate();
godot.Tree.Root.AddChild(instance);
Assert.NotNull(instance.Parent);
}
}// With the editor native variant (TwoDogVariant=editor),
// TOOLS_ENABLED code paths and [Tool] scripts are active.
using twodog;
using var engine = new Engine("tool", "./project", "--headless");
using var godot = engine.Start();
// Drive the scene tree from your own code:
// batch processing, validation, custom tooling.
var scene = GD.Load<PackedScene>("res://main.tscn");
godot.Tree.Root.AddChild(scene.Instantiate());# Install template
dotnet new install 2dog
# Create your Project
dotnet new 2dog -n LetsCook
cd LetsCook
# Assets are imported automatically during build
dotnet run --project LetsCook
# Optionally, open and edit the project in the Godot Editor
godot-mono -e --path LetsCook.Godotdotnet add package 2dog
dotnet add package 2dog.xunit