Skip to content

Rename Preferences to Settings in the appropriate places#24613

Open
cart wants to merge 3 commits into
bevyengine:mainfrom
cart:preferences-to-settings
Open

Rename Preferences to Settings in the appropriate places#24613
cart wants to merge 3 commits into
bevyengine:mainfrom
cart:preferences-to-settings

Conversation

@cart

@cart cart commented Jun 13, 2026

Copy link
Copy Markdown
Member

Objective

bevy_settings currently conflates "settings" and "preferences" in a number of places. The name of the framework itself is Bevy Settings, so anything that drives general "settings" behaviors should use "settings" terminology. For example, PreferencesPlugin should be SettingsPlugin because it handles all SettingsGroup types (regardless of their "scope" such as "preferences.toml").

Solution

Use "settings" instead of "preferences" in the appropriate places. I've also removed the custom ExitAfterSave commands in the examples as they are unnecessary.

This should land in 0.19 because we haven't published this API yet and getting naming right is important.

@cart cart added this to the 0.19 milestone Jun 13, 2026
@cart cart added the C-Code-Quality A section of code that is hard to understand or change label Jun 13, 2026
/// Builds the settings file registry by scanning the type registry for settings resources.
/// This is separated from loading to enable testing without file I/O.
///
/// Returns the [`PreferencesFileRegistry`] that tracks which resources are associated with

@davewa davewa Jun 13, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// Returns the [`PreferencesFileRegistry`] that tracks which resources are associated with
/// Returns the [`SettingsFileRegistry`] that tracks which resources are associated with

/// Saving of settings is not automatic; the recommended practice is to issue a
/// [`SaveSettingsDeferred`] command after modifying a settings resource. This will wait for
/// a short interval and then spawn an i/o task to write out the changed settings file. You can
/// also issue a [`SavePreferencesSync::IfChanged`] command immediately before exiting the app.

@davewa davewa Jun 13, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// also issue a [`SavePreferencesSync::IfChanged`] command immediately before exiting the app.
/// also issue a [`SaveSettingsSync::IfChanged`] command immediately before exiting the app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-Code-Quality A section of code that is hard to understand or change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants