
ULTRAKILL
You are viewing a potentially older version of this package. View Latest Version

A library mod for configuring plugin data at runtime.
This mod does more or less nothing on its own. I haven't got around to making proper documentation for it yet.
Example usage
public class MyPlugin : BaseUnityPlugin
{
private ConfigBuilder config;
private void Awake()
{
config = new ConfigBuilder("MyName.MyPlugin", "My Plugin");
config.Build();
}
}
public class MyBehaviour : MonoBehaviour
{
//All of these will be automatically initialized when config.Build is called.
[Configgable]
private static float myFloat = 4f;
//A path and display name are optional.
[Configgable]
private static ConfigToggle myToggle = new ConfigToggle(true);
//Defines a path in the menu and a display name.
[Configgable("MySliders", "Slider That Controls Things")]
private static FloatSlider slider = new FloatSlider(1f, 0f, 1f);
private void Update()
{
//Prints current value of the slider.
Debug.Log(slider.Value);
}
}