Game Settings

The GameSettings plugin provides a complete settings system for your game, covering audio, video, and keybind configuration with a pre-built UI.

Audio Settings

The AudioSettingsData manages:

  • Master volume

  • Music volume

  • Sound effects volume

  • Voice volume

  • Mute toggles per channel

Players adjust these through sliders in the settings UI. Changes take effect immediately.

Video Settings

The VideoSettingsData manages:

  • Resolution

  • Fullscreen mode (fullscreen, windowed, borderless)

  • Quality preset

  • V-Sync

  • Frame rate limit

Video settings use Unity's built-in quality settings system.

Keybind Settings

The KeybindSettingsData manages customizable key bindings. The system integrates with Unity's Input System.

Keybind Category Entries group related keybinds together (Movement, Combat, UI, etc.). Create these in the Spark Editor under the Keybind Categories tab.

The keybind UI shows all bindings organized by category. Players can click a binding and press a new key to remap it. The system handles:

  • Conflict detection (warning when two actions use the same key)

  • Reset to defaults

  • Per-category organization

Settings UI

The GameSettings plugin includes a complete settings UI:

  • GameSettingsUI: The main settings window with tabs for each category.

  • AudioSettingsUI: Audio settings panel with volume sliders.

  • VideoSettingsUI: Video settings panel with resolution dropdowns and quality options.

  • KeybindSettingsUI: Keybind settings panel with a list of remappable bindings.

  • KeybindRowUI: Individual keybind row showing action name and current key.

Custom Settings Panels

The settings UI uses a registry system (GameSettingsUIRegistry) that allows additional settings panels to be added. If you have a plugin that needs its own settings section, it can register a panel with the settings UI.

Settings Events

  • GameSettingsLoadedEvent: Settings were loaded from disk.

  • GameSettingsUIOpenedEvent: The settings UI was opened.

  • GameSettingsUIClosedEvent: The settings UI was closed.

  • KeybindChangedEvent: A keybind was remapped.

Persistence

Game settings save independently from gameplay saves. They persist globally, not per save slot. This means changing your volume in one save file changes it for all save files, which is the expected behavior for settings.

Settings are saved through GameSettingsSaveProvider.

Last updated

Was this helpful?