You can have a custom Main Loop
Start Godot from your own Main(), run each frame when you choose, and reach every node from C#.
using var engine = new Engine("MyGame", args: args);
engine.Start();
// Update() returns false when Godot quits.
while (engine.Update())
{
// Your per-frame logic here
}
Core concepts โTest it in your IDE or Test Platform
Load scenes, await signals and assert on real engine state with xUnit, NUnit or GdUnit, in your IDE and in CI.
[Collection<HeadlessCollection>]
public class SceneTests(HeadlessFixture godot)
{
[Fact]
public void MainSceneLoads()
{
var main = GD.Load<PackedScene>("res://main.tscn")
.Instantiate();
godot.Tree.Root.AddChild(main);
Assert.True(main.IsInsideTree());
main.Free();
}
}
Testing guide โ