2dog.avalonia 4.7.2.159

There is a newer version of this package available.
See the version list below for details.
dotnet add package 2dog.avalonia --version 4.7.2.159
                    
NuGet\Install-Package 2dog.avalonia -Version 4.7.2.159
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="2dog.avalonia" Version="4.7.2.159" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="2dog.avalonia" Version="4.7.2.159" />
                    
Directory.Packages.props
<PackageReference Include="2dog.avalonia" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add 2dog.avalonia --version 4.7.2.159
                    
#r "nuget: 2dog.avalonia, 4.7.2.159"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package 2dog.avalonia@4.7.2.159
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=2dog.avalonia&version=4.7.2.159
                    
Install as a Cake Addin
#tool nuget:?package=2dog.avalonia&version=4.7.2.159
                    
Install as a Cake Tool

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.

Docs: https://2dog.dev/hosts/avalonia

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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