WithPrefs

by StarManta

Instead of coding many switches and sliders and manually hook them up with preferences, these functions hook up easily with preferences. These use PlayerPrefsx but can easily be converted to use plain PlayerPrefs if desired.

Usage:

myVar = ToggleWithPref("My Variable", myVar); myFloat = SliderWithPref("My Float", myFloat, 0.0, 1.0);