ImGui UI
An ImGui overlay for in-game tools, debug panels and live tweaking. Immediate-mode UI suits this job because there is no widget tree to keep in sync - you describe the panel every frame from whatever the values happen to be. The example is short because the toolkit owns the setup: initialising the integration, feeding it input and drawing it are already handled.
The Program.cs file shows how to:
- Initialising the ImGui integration
- Drawing windows, menus and controls every frame
- Why immediate mode removes the need to sync UI state
- Showing live stats in a debug panel

View on GitHub.
using Stride.CommunityToolkit.Bepu;
using Stride.CommunityToolkit.Engine;
using Stride.CommunityToolkit.ImGui;
using Stride.CommunityToolkit.ImGui.DebugTools;
using Stride.CommunityToolkit.Rendering.Text;
using Stride.CommunityToolkit.Skyboxes;
using Stride.Engine;
using var game = new Game();
game.Run(new SceneSetup3D { Profiler = true }.UseBepu().UseSkybox(), start: Start);
void Start(Scene scene)
{
game.AddEntityDebugSceneRenderer(new()
{
EnableBackground = true
});
// Each of these registers itself with the game on construction, so the instance is deliberately
// not kept: the game owns them from here on.
_ = new ImGuiSystem(game.Services, game.GraphicsDeviceManager);
_ = new HierarchyView(game.Services);
_ = new PerfMonitor(game.Services);
Inspector.FindFreeInspector(game.Services).Target = game.SceneSystem.SceneInstance;
// A capped frame rate makes the profiler's numbers easier to read
game.SetMaxFPS(60);
}