A plug-and-play, data-driven settings framework for Unity built around ScriptableObjects, runtime profiles, and persistent save data.
Supports:
- Audio settings
- Video/quality settings
- Key rebinding
- Custom sliders/indexes/toggles
- Save & load persistence
- Runtime events
- Default profile restoration
Built for Unity 2021 LTS+.
The system cleanly separates:
- Runtime state
- Save data
- Default values
- UI interaction
- Disk I/O
This keeps gameplay/UI code independent from serialization and file handling.
Custom settings can be added directly from the inspector without modifying code.
Supported custom types:
- Float sliders
- Integer indexes/dropdowns
- Boolean toggles
The system uses:
- Default Profile → stores default settings
- Active Profile → runtime session values
This allows instant restoration of defaults and easy runtime editing.
Settings are automatically saved and loaded using serialized save data.
Current implementation:
- Binary serialization (
BinaryFormatter)
The system can also be migrated to JSON serialization easily.
Built-in events allow UI and gameplay systems to react instantly to changes.
Examples:
- Volume updates
- Quality changes
- Key rebinding
- Full profile reloads
Includes:
- Primary + alternate keybinds
- Runtime rebinding
- Key detection
- Default restoration
┌─────────────────┐ Resources.Load ┌──────────────────────┐
│ SettingsSystem │ ─────────────────────── │ SettingsProfile │
│ (static API) │◄──── events / props ───►│ (ScriptableObject) │
└────────┬────────┘ └──────────────────────┘
│ SaveSettingsData / LoadSettingsData
▼
┌─────────────────┐ binary file (.dat) ┌──────────────────────┐
│ SaveSystem │ ◄────────────────────── │ SettingsData │
│ (disk I/O) │ │ (serialisable DTO) │
└─────────────────┘ └──────────────────────┘
| Script | Responsibility |
|---|---|
SaveSystem.cs |
Generic save/load serialization |
SettingsData.cs |
Serializable settings snapshot |
SettingsProfile.cs |
ScriptableObject settings container |
SettingsSystem.cs |
Main public API |
Copy the scripts into your Unity project:
Assets/
└─ Settings System/
├─ Scripts/
│ ├─ SaveSystem.cs
│ ├─ SettingsData.cs
│ ├─ SettingsProfile.cs
│ └─ SettingsSystem.cs
Create two SettingsProfile ScriptableObjects:
DefaultActive
Place them inside:
Resources/Settings Profiles/
Required exact path:
Assets/Resources/Settings Profiles/
Configure all default values inside the Default profile.
The Active profile is populated automatically at runtime.
SettingsSystem.MasterVolume = 0.8f;
SettingsSystem.MusicVolume = 0.5f;
SettingsSystem.SaveSettingsData();KeyCode key = await SettingsSystem.DetectKeybind();
SettingsSystem.SetKeybind("Jump", key);
SettingsSystem.SaveSettingsData();SettingsSystem.SetCustomSlider("Brightness", 0.9f);
bool subtitles =
SettingsSystem.GetCustomToggle("Subtitles");void OnEnable()
{
SettingsSystem.OnMasterVolumeChanged += RefreshAudio;
SettingsSystem.OnProfileLoaded += RefreshUI;
}
void OnDisable()
{
SettingsSystem.OnMasterVolumeChanged -= RefreshAudio;
SettingsSystem.OnProfileLoaded -= RefreshUI;
}The included demo scene showcases:
- Audio sliders
- Quality dropdown
- Runtime key rebinding
- Custom settings
- Save/load functionality
- Undo unsaved changes
Simply add entries in:
customSliderscustomIndexescustomToggles
No additional code required.
You can extend the framework with:
- Graphics settings
- Accessibility settings
- Gameplay modifiers
- Input presets
- Localization options
BinaryFormatteris deprecated in modern .NET- No encryption layer
- New Input System rebinding must be implemented manually
- WebGL persistence may require a PlayerPrefs fallback
Planned improvements:
- JSON serialization support
- New Input System implementation
- Save encryption/obfuscation
- WebGL compatibility improvements
This project is licensed under the MIT License.
Developed by Belal Saad.


