BepInExConfigurationGenerator 0.0.3
See the version list below for details.
dotnet add package BepInExConfigurationGenerator --version 0.0.3
NuGet\Install-Package BepInExConfigurationGenerator -Version 0.0.3
<PackageReference Include="BepInExConfigurationGenerator" Version="0.0.3" />
<PackageVersion Include="BepInExConfigurationGenerator" Version="0.0.3" />
<PackageReference Include="BepInExConfigurationGenerator" />
paket add BepInExConfigurationGenerator --version 0.0.3
#r "nuget: BepInExConfigurationGenerator, 0.0.3"
#:package BepInExConfigurationGenerator@0.0.3
#addin nuget:?package=BepInExConfigurationGenerator&version=0.0.3
#tool nuget:?package=BepInExConfigurationGenerator&version=0.0.3
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);
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.