Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using BepInEx;
- using BepInEx.Configuration;
- using HarmonyLib;
- using UnityEngine;
- namespace ConfigExample
- {
- [BepInPlugin(PLUGIN_GUID, PLUGIN_NAME, PLUGIN_VERSION)]
- public class PluginName : BaseUnityPlugin
- {
- public const string PLUGIN_GUID = "your.mod.gui";
- public const string PLUGIN_NAME = "your.mod.name";
- public const string PLUGIN_VERSION = "1.0.0";
- internal static ConfigEntry<bool> Toggle;//true or false
- internal static ConfigEntry<int> Intvalue; //uses int values
- internal static ConfigEntry<KeyboardShortcut> KeyBind;//hot keys
- void Awake()
- {
- Harmony harmony = new Harmony(PLUGIN_GUID);
- harmony.PatchAll();
- Toggle = Config.Bind("Category Name", "Enable", true, new ConfigDescription("", null, null));//this is a bool value
- Intvalue = Config.Bind("Category Name", "Value Name", 128, new ConfigDescription("", new AcceptableValueRange<int>(0, 255), null)); //this is a slider
- KeyBind = Config.Bind("Category Name", "HotKey Name", new KeyboardShortcut(KeyCode.F6), new ConfigDescription("", null, null));//this is a keybind
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement