Supplies an interface for modders to create their own settings pages.
To use, just install the mod, and any other mods which use it.
Note: there may be warnings that a mod "tried to load assembly" something something, do not worry about them, nothing is broken.
Thanks to @ElGatoVolador for the pretty thumbnail!
To use this mod in one of your mods:
First, install the mod, it handles the settings creation, saving, loading, etc. in-game, so you can't test without it.
Then download the Mod Settings.zip, and unzip the files somewhere (or just unzip individual files as you need them).
SPModSettings.dll is the shared assembly you will use to communicate with the mod, it goes in your mod project Assets folder (anywhere you like), then find it in the Unity project explorer, select it, and on the Mod Builder window hit "Save Selected Assets" (this ensures that your mod won't fail to load if Mod Settings mod isn't installed and loaded before it).
SPModSettings.xml is the code documentation, so you can have intellisense comments for what functions and variables do/are, it goes in the same folder as
SPModSettings.dll, but do NOT save it with mod builder (not that it would break anything, but it would pointlessly increase the size of your mod).
To get started, you'll need some settings code, you can use the code at the end of my mod settings reveal video, or the source code for the Adjustable Gravity mod on GitHub as a guide (be sure to have
using SPModSettings at the top of your settings code).
This script must be placed on a
Persistent Object, a GameObject with a PersistentObject script from the mod tools, which you then save with the mod tools.
An easy pattern (though not necessarily "good practice"...) to access the settings in another script is to make the output variable
public static, so for example the Adjustable Gravity script could have
public static Vector3 GravityVector, which can then be accessed from any script like so: