Source generator that will emit Godot layer names as constant values for use in masks using a Source Generator.
Will generate code so you can grab these layers statically and typed using C# code.
using Godot;
var myMask1 = LayerNames.Render2D.ImLayer1Mask;
var myMask2 = LayerNames.Render2D.ImLayer2Mask;
- Grab the Source Generator from nuget.
- Add the project.godot as an additional file to your .csproj project file. Like this snippet:
<ItemGroup>
<AdditionalFiles Include="project.godot" />
</ItemGroup>