Info
| Version: | 2.7.1 |
| Author(s): | Cat-Lips |
| Last Update: | Wednesday, September 16, 2026 |
| .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)
Dependencies
- Microsoft.CodeAnalysis.CSharp(>= 3.8.0)
Tags
- Version 2.7 introduces an ever so slight [BREAKING CHANGE] in that scope strings have been replaced with a more definitive enum set.
- Version 2.7 introduces an ever so slight [BREAKING CHANGE] in that the Autoload class must now be explicitly decorated instead of implicitly generated.
- Version 2.7 introduces an ever so slight [BREAKING CHANGE] in that identifiers comprised of unicode characters no longer need to be prefixed with `_` and other invalid characters are now removed instead of being replaced with `_`.
* `SceneTree` class attribute:
-- Provides strongly typed access to the scene hierarchy (via `_` operator)
* `AnimNames` class attribute (GD4 only):
-- Provides strongly typed access to animation names defined in .tres and .tscn files
* `AudioBus` class attribute (GD4 only):
-- Provides strongly typed access to audio bus names and ids
* `AutoEnum` enum/class attribute (GD4 only):
-- (enum) Generates efficient Str/Parse for enums
-- (class) Generates enum for static data classes (for editor/network use)
* `Autoload` 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)
* `GlobalGroups` class attribute (GD4 only):
-- Provides strongly typed access to global groups defined in godot.project
* `GodotOverride` method attribute:
-- Allows use of On*, instead of virtual _* overrides
* `InputMap` class attribute:
-- Provides strongly typed access to input actions defined in godot.project
* `Instantiable` class attribute (GD4 only):
-- Generates configurable static method(s) to instantiate scene
* `LayerNames` class attribute:
-- Provide strongly typed access to layer names defined in godot.project
* `Notify` property attribute:
-- Generates boiler plate code, triggering only when values differ
* `OnImport` method attribute (GD4 only):
-- Generates default plugin overrides and options to make plugin class cleaner (inherit from OnImportEditorPlugin)
* `OnInstantiate` method attribute:
-- Generates a static Instantiate method with matching args that calls attributed method as part of the instantiation process
* `ResourceTree` class attribute (GD4 only):
-- Provides strongly typed access to the resource hierarchy
* Generators for `Rpc` methods (GD4 only):
-- Provides strongly typed access to Rpc and RpcId methods
* `Shader` class attribute (GD4 only):
-- Provides strongly typed access to shader uniforms (or visual shader parameters)
* `ShaderGlobals` class attribute (GD4 only):
-- Provides strongly typed access to global shader uniforms defined in godot.project
* `Singleton` class attribute (GD4 only):
-- Provides single instance access to data or scene objects
* `TR` class attribute (GD4 only):
-- Provides strongly typed access to translation locales and keys (as defined in csv)
- Includes base classes/helpers to create project specific source generators.