BepInExConfigurationGenerator 0.0.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package BepInExConfigurationGenerator --version 0.0.2
                    
NuGet\Install-Package BepInExConfigurationGenerator -Version 0.0.2
                    
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="BepInExConfigurationGenerator" Version="0.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BepInExConfigurationGenerator" Version="0.0.2" />
                    
Directory.Packages.props
<PackageReference Include="BepInExConfigurationGenerator" />
                    
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 BepInExConfigurationGenerator --version 0.0.2
                    
#r "nuget: BepInExConfigurationGenerator, 0.0.2"
                    
#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 BepInExConfigurationGenerator@0.0.2
                    
#: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=BepInExConfigurationGenerator&version=0.0.2
                    
Install as a Cake Addin
#tool nuget:?package=BepInExConfigurationGenerator&version=0.0.2
                    
Install as a Cake Tool

BepInEx Configuration Generator

This is a configuration generation utility to help you iterate on mods quickly.

Quick Start

Create a class called MyConfig.cs.

To allow the source generator to complete the class, add the [GenerateConfig] attribute to the class, and mark the class as static partial.

using BepInEx.Configuration.Generators;

[GenerateConfig]
public static partial class MyConfig
{
    
}

To create a new configuration entry, add a new read-only property. Add the [Entry] attribute to the property, and mark the property as static partial.

using BepInEx.Configuration.Generators;

[GenerateConfig]
public static partial class MyConfig
{
   [Entry("Section", "Key", 0, "Description")]
   public static partial int Test { get; } 
}

Register the configs to your plugin.

// ...

[BepInPlugin(MyPluginInfo.PLUGIN_GUID, MyPluginInfo.PLUGIN_NAME, MyPluginInfo.PLUGIN_VERSION)]
public sealed class Plugin : BaseUnityPlugin
{
    private void Awake()
    {
+       MyConfig.Register(Config);
        // ...
    }
}

You can then read from the entry as usual.

Debug.Log(ConfigTest.Test);
There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

  • .NETStandard 2.0

    • 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.

Version Downloads Last Updated
0.1.0 240 5/25/2025
0.0.3 163 5/25/2025
0.0.2 151 5/25/2025
0.0.1 130 5/24/2025