CSDebugDraw2D 1.0.2

dotnet add package CSDebugDraw2D --version 1.0.2
                    
NuGet\Install-Package CSDebugDraw2D -Version 1.0.2
                    
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="CSDebugDraw2D" Version="1.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CSDebugDraw2D" Version="1.0.2" />
                    
Directory.Packages.props
<PackageReference Include="CSDebugDraw2D" />
                    
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 CSDebugDraw2D --version 1.0.2
                    
#r "nuget: CSDebugDraw2D, 1.0.2"
                    
#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 CSDebugDraw2D@1.0.2
                    
#: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=CSDebugDraw2D&version=1.0.2
                    
Install as a Cake Addin
#tool nuget:?package=CSDebugDraw2D&version=1.0.2
                    
Install as a Cake Tool

Godot 4.0 .NET 8

https://www.nuget.org/packages/CSDebugDraw2D

DebugDraw2D – C# Port of AlmostBearded/GodotDebugDraw

A C# conversion of the original GodotDebugDraw GD scripts, providing functionality for debugging through visual shape rendering.

Installation

  1. Copy the csdebugdraw2d folder into your addons directory (create one if necessary).
  2. Ensure your Godot Project has a .sln file and that scripts have been built at least once.
    • Add any C# script to generate a solution file.
    • Build the project via dotnet build in the terminal or using the Godot Editor.
  3. Enable the addon in Project → Plugins.

Original Documentation

Autoload Setup

To ensure DebugDraw2D is accessible globally, you need to add it as an Autoload script.

Steps:

  1. Open Project → Project Settings.
  2. Navigate to the Autoload tab.
  3. Add the DebugDraw2D script by locating its path and naming it DebugDraw2D.

Your settings should resemble this:
Example Autoload Setup

Usage

Since DebugDraw2D is an Autoload, it is available globally in your project.

Available Methods:

  • DebugDraw2D.line(...)
  • DebugDraw2D.rect(...)
  • DebugDraw2D.cube(...)
  • DebugDraw2D.arrow(...)
  • DebugDraw2D.circle(...)
  • DebugDraw2D.circle_arc(...)

Features:

  • Draw in any color
  • Custom line width
  • Filled shapes using DebugDraw2D...._filled()
  • Render for a single frame or a set duration

Supported Primitives:

  • Lines
  • Arrows
  • Rectangles
  • Cubes
  • Circles
  • Circle Arcs / Pies
  • Polygons

Explore the source code for additional details—it's lightweight and easy to navigate.

Extensions & Contributions

Thank you to AlmostBearded for the original GD Script Library.

Need a new feature? Send me a request, and I'll consider extending the addon!
Alternatively, feel free to enhance the source code yourself and submit a pull request—I'll review and merge useful additions.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.2 129 7/15/2025