GodotSharp.SourceGenerators NuGet Package

C# Source Generators for use with the Godot Game Engine (supports Godot 4 and .NET 9!)
* `SceneTree` class attribute:
-- Generates class property for uniquely named nodes
-- Provides strongly typed access to the scene hierarchy (via `_` operator)
* `GodotOverride` method attribute:
-- Allows use of On*, instead of virtual _* overrides
-- (Requires partial method declaration for use with Godot 4)
* `Notify` property attribute:
-- Generates boiler plate code, triggering only when values differ
-- (Automagically triggers nested changes for Resource and Resource[])
* `InputMap` class attribute:
-- Provides strongly typed access to input actions defined in godot.project
* `LayerNames` class attribute:
-- Provide strongly typed access to layer names defined in godot.project
* NEW: `Autoload`/`AutoloadRename` class attribute:
-- Provide strongly typed access to autoload nodes defined in godot.project
* `CodeComments` class attribute:
-- Provides a nested static class to access property comments from code (useful for in-game tooltips, etc)
* `OnInstantiate` method attribute:
-- Generates a static Instantiate method with matching args that calls attributed method as part of the instantiation process
-- (Also generates a protected constructor to ensure proper initialisation - can be deactivated via attribute)
* `OnImport` method attribute (GD4 only):
-- Generates default plugin overrides and options to make plugin class cleaner (inherit from OnImportEditorPlugin)
* Includes base classes/helpers to create project specific source generators.




Got any GodotSharp.SourceGenerators Question?





Info

Version: 2.6.0-250131-2115.Release
Author(s): Cat-Lips
Last Update: Friday, January 31, 2025
.NET Fiddle: Online Example
Project Url: https://github.com/Cat-Lips/GodotSharp.SourceGenerators
NuGet Url: https://www.nuget.org/packages/GodotSharp.SourceGenerators


Install
Install-Package GodotSharp.SourceGenerators
dotnet add package GodotSharp.SourceGenerators
paket add GodotSharp.SourceGenerators
GodotSharp.SourceGenerators Download (Unzip the "nupkg" after downloading)



Tags



STATS

must-have-score

2.5

avg-downloads-per-day

9

days-since-last-release

76