GDExternalGlobalizer.Generator
0.2.0
dotnet add package GDExternalGlobalizer.Generator --version 0.2.0
NuGet\Install-Package GDExternalGlobalizer.Generator -Version 0.2.0
<PackageReference Include="GDExternalGlobalizer.Generator" Version="0.2.0" />
<PackageVersion Include="GDExternalGlobalizer.Generator" Version="0.2.0" />
<PackageReference Include="GDExternalGlobalizer.Generator" />
paket add GDExternalGlobalizer.Generator --version 0.2.0
#r "nuget: GDExternalGlobalizer.Generator, 0.2.0"
#:package GDExternalGlobalizer.Generator@0.2.0
#addin nuget:?package=GDExternalGlobalizer.Generator&version=0.2.0
#tool nuget:?package=GDExternalGlobalizer.Generator&version=0.2.0
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
- Create your class library, adding classes that you'd like to expose as global normally.
- Mark your external classes as
partial
and add[GlobalizerWrap(null)]
or a specific name. - Build the project. Generated wrappers appear under Analyzers → Generated Files.
- 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
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- GDExternalGlobalizer.Abstractions (>= 0.1.0)
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.