๐ฎ Full Godot Power
Access the complete GodotSharp API โ scenes, physics, rendering, audio, input โ everything Godot can do.
Godot speak! Godot run!
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.xunit;
[Collection("GodotHeadless")]
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);
}
}// Build with: dotnet build -c Editor
// Enables TOOLS_ENABLED for import and editor features
using twodog;
using var engine = new Engine("importer", "./project");
using var godot = engine.Start();
// Import a texture with custom settings
var importer = ResourceImporterTexture.Singleton;
// Use Godot's full import pipeline
// Access editor-only APIs like EditorImportPlugin, EditorInterface, etc.# Install template
dotnet new install 2dog
# Create your Project
dotnet new 2dog -n LetsCook
cd LetsCook
# Open and edit the project in Godot Editor or just run --import once
godot-mono --path LetsCook.Godot --import
dotnet run --project LetsCookdotnet add package 2dog
dotnet add package 2dog.xunit