GDExternalGlobalizer.Generator 0.2.0

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

Godot.Globalizer

Source generator that produces [GlobalClass] Godot wrapper classes for your custom Godot.Node subclasses annotated with [GlobalizerWrap].

Packages

  • Godot.Globalizer (analyzer / source generator)
  • Godot.Globalizer.Abstractions (only the attribute, pulled transitively when you add the generator)

You normally only install Godot.Globalizer.

What It Does

For any partial, non-generic class that inherits from GodotObject:

using Godot;
using Godot.Globalizer.Attributes;

[GlobalizerWrap(null)]
public partial class Enemy : Node { }

Generator adds (conceptually):

[GlobalClass]
public partial class EnemyGlobal : Enemy {
    public static EnemyGlobal Create() => new();
}

If you provide a non‑empty name: [GlobalizerWrap("EnemyRuntime")] it generates that name instead of EnemyGlobal.

Skips generation when:

  • Class is generic
  • Class does not derive (directly or indirectly) from Godot.Node
  • A type with the intended wrapper name already exists in the same namespace

Empty or whitespace custom wrapper names fall back to OriginalNameGlobal.

Installation

NuGet (after published):

dotnet add package Godot.Globalizer

No extra props needed; analyzers auto-load.

Usage Checklist

  1. Create your class library, adding classes that you'd like to expose as global normally.
  2. Mark your external classes as partial and add [GlobalizerWrap(null)] or a specific name.
  3. Build the project. Generated wrappers appear under Analyzers → Generated Files.
  4. Use the generated wrapper (e.g. EnemyGlobal) where a globally registered class is desired.

Attribute Reference

[GlobalizerWrap(string? wrapperName)]
// wrapperName: null/empty/whitespace -> OriginalNameGlobal

License

MIT

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on GDExternalGlobalizer.Generator:

Package Downloads
StateMachineKit.Godot

Godot integration layer for StateMachineKit finite state machine library.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.2.0 195 8/26/2025
0.1.2 201 8/26/2025