Btd6ModHelper.SourceGenerators
1.1.1
dotnet add package Btd6ModHelper.SourceGenerators --version 1.1.1
NuGet\Install-Package Btd6ModHelper.SourceGenerators -Version 1.1.1
<PackageReference Include="Btd6ModHelper.SourceGenerators" Version="1.1.1"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
<PackageVersion Include="Btd6ModHelper.SourceGenerators" Version="1.1.1" />
<PackageReference Include="Btd6ModHelper.SourceGenerators"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add Btd6ModHelper.SourceGenerators --version 1.1.1
#r "nuget: Btd6ModHelper.SourceGenerators, 1.1.1"
#:package Btd6ModHelper.SourceGenerators@1.1.1
#addin nuget:?package=Btd6ModHelper.SourceGenerators&version=1.1.1
#tool nuget:?package=Btd6ModHelper.SourceGenerators&version=1.1.1
Btd6ModHelper.SourceGenerators
Source generators for BTD6 Mod Helper mods.
ModResources
Auto-generates a strongly-typed ModResources class so you can reference your embedded resources by name without typos and without writing string literals.
For every EmbeddedResource in your mod project with a known extension, a static readonly field is emitted on the ModResources class:
| Extension | Type |
|---|---|
.png, .jpg |
SpriteResource<TMod> |
.wav, .mp3, .ogg, .flac, .aac, .wma, .m4a |
AudioClipResource<TMod> |
.bundle |
BundleResource<TMod> |
.json |
JsonResource<TMod> |
TMod is auto-detected as the concrete class in your project that inherits from BloonsMod.
If you have a series of numbered audio clips (pop1.wav, pop2.wav, pop3.wav, ...), a RandomizedAudioClipResource<TMod> named after the shared base (pop) is also generated — unless an audio clip with that exact base name already exists.
GitHub Actions workflow
If your project already has a .github/workflows/build.yml, the generator will keep that file in sync with values from your ModHelperData (currently PROJECT_NAME and DLL_NAME).
- The generator only touches files that already exist — delete
.github/workflows/build.ymlto opt out for the project. - Opt out at the csproj level with
<GenerateActionsWorkflow>false</GenerateActionsWorkflow>.
Opt out
Set <ModHelperSourceGenerators>false</ModHelperSourceGenerators> in your csproj to skip all generators.
Set <GenerateModResources>false</GenerateModResources> to skip just the ModResources generator.
Set <GenerateActionsWorkflow>false</GenerateActionsWorkflow> to skip just the workflow generator.
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.