2dog.avalonia
4.8.0.160-beta3
See the version list below for details.
dotnet add package 2dog.avalonia --version 4.8.0.160-beta3
NuGet\Install-Package 2dog.avalonia -Version 4.8.0.160-beta3
<PackageReference Include="2dog.avalonia" Version="4.8.0.160-beta3" />
<PackageVersion Include="2dog.avalonia" Version="4.8.0.160-beta3" />
<PackageReference Include="2dog.avalonia" />
paket add 2dog.avalonia --version 4.8.0.160-beta3
#r "nuget: 2dog.avalonia, 4.8.0.160-beta3"
#:package 2dog.avalonia@4.8.0.160-beta3
#addin nuget:?package=2dog.avalonia&version=4.8.0.160-beta3&prerelease
#tool nuget:?package=2dog.avalonia&version=4.8.0.160-beta3&prerelease
2dog.avalonia
Embed a Godot viewport inside an Avalonia application.
GodotControl brings the engine's rendered output into Avalonia's compositor, so ordinary
Avalonia controls – panels, buttons, popups – render on top of the running game.
var session = new GodotSession(new GodotSessionOptions
{
Project = "mygame",
Path = Engine.ResolveContent(),
});
godotControl.Session = session;
session.Start();
- The session owns the engine (one per process) and pumps frames on the Avalonia UI thread.
- The control is a view: it can be attached, detached, and re-parented freely.
- On natives with texture-sharing support the viewport is composited zero-copy on the GPU
(D3D11 shared textures on Windows, Vulkan external memory on Linux, IOSurface on macOS);
otherwise a CPU readback fallback is used automatically (
GodotSessionOptions.PresentationMode). - Dispose the session before the application exits (e.g. in
Window.OnClosing).
Requires an explicit reference to 2dog.engine or 2dog.engine.double, and Avalonia 12.1.1+.
On Windows, declare DPI awareness in your app manifest (the scaffolded host does) so the
engine's own DPI call cannot desync Avalonia's scaling mid-run.
The compositor paces rendering; sessions disable Godot's low-processor mode and hidden-window
vsync to avoid competing delays. On Windows the default uses the compositor's frame rate;
an explicit MaxFramesPerSecond still caps engine frames.
On Windows, captured/confined mouse modes operate on the visible control, including continuous
mouse look. Use matching updated native packages: the hidden engine window must not take OS capture.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Avalonia (>= 12.1.1)
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.8.0.196-beta3 | 0 | 11/13/2026 |
| 4.8.0.193-beta3 | 0 | 11/13/2026 |
| 4.8.0.190-beta3 | 0 | 11/13/2026 |
| 4.8.0.188-beta3 | 0 | 11/13/2026 |
| 4.8.0.187-beta3 | 1 | 11/12/2026 |
| 4.8.0.184-beta3 | 0 | 11/12/2026 |
| 4.8.0.182-beta3 | 0 | 11/12/2026 |
| 4.8.0.163-beta3 | 0 | 11/12/2026 |
| 4.8.0.161-beta3 | 2 | 11/10/2026 |
| 4.8.0.160-beta3 | 0 | 11/10/2026 |
| 4.7.2.197 | 0 | 11/13/2026 |
| 4.7.2.192 | 0 | 11/13/2026 |
| 4.7.2.186 | 0 | 11/12/2026 |
| 4.7.2.183 | 0 | 11/12/2026 |
| 4.7.2.181 | 0 | 11/12/2026 |
| 4.7.2.162 | 8 | 11/10/2026 |
| 4.7.2.159 | 0 | 11/10/2026 |
| 4.7.2.158 | 1 | 11/9/2026 |
| 4.7.2.154 | 0 | 11/8/2026 |