Expand description
Framework for saving and loading user settings files in Bevy applications.
The core of the framework is SettingsPlugin, which
loads and synchronizes settings with the filesystem or browser
local storage, depending on platform.
Settings are loaded into resources that implement SettingsGroup,
which is best implemented using the derive macro SettingsGroup.
In addition, the resource must have the #[reflect(SettingsGroup, Default)] annotation in
order to be saved and loaded by the plugin.
Once all these conditions are met, and when SettingsPlugin is added, systems can query
for settings using Res and ResMut like any other resource.
Refer to SettingsPlugin for detailed usage information.
Structs§
- Reflect
Settings Group - Reflected data from a
SettingsGroup. - Save
Settings Deferred - A Command which saves changed settings after a delay. This is debounced: issuing this command multiple times resets the delay timer each time. This is meant to be used for settings which change at a high frequency, such as dragging a slider which controls the game’s audio volume. The default delay is 1.0 seconds.
- Settings
Plugin - Plugin to orchestrate loading and saving settings.
Enums§
- Save
Settings - A
Commandwhich saves settings to disk. Actual file system operations happen in another thread. - Save
Settings Sync - A Command which saves settings to disk. This blocks the command queue until saving is complete.
Traits§
- Settings
Group - Trait which identifies a type as corresponding to a section with a settings file.
Derive Macros§
- Settings
Group - Implement
SettingsGroup.