diff options
author | kobewi <kobewi4e@gmail.com> | 2021-02-24 16:37:29 +0100 |
---|---|---|
committer | kobewi <kobewi4e@gmail.com> | 2021-03-07 01:21:44 +0100 |
commit | 156c402f2bfd391f2b1160710ff206f4427b8501 (patch) | |
tree | 234b0f37c8da0ea46fc53a8bc825f2ba14db255f | |
parent | 7f8bfd6ed17b9b4f3ae93deb506e250fba43e452 (diff) |
Allow to save override.cfg with ProjectSettings
-rw-r--r-- | core/config/project_settings.cpp | 2 | ||||
-rw-r--r-- | doc/classes/ProjectSettings.xml | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/core/config/project_settings.cpp b/core/config/project_settings.cpp index c872ae2162..02effc2001 100644 --- a/core/config/project_settings.cpp +++ b/core/config/project_settings.cpp @@ -909,7 +909,7 @@ Error ProjectSettings::save_custom(const String &p_path, const CustomMap &p_cust custom_features += f; } - if (p_path.ends_with(".godot")) { + if (p_path.ends_with(".godot") || p_path.ends_with("override.cfg")) { return _save_settings_text(p_path, props, p_custom, custom_features); } else if (p_path.ends_with(".binary")) { return _save_settings_binary(p_path, props, p_custom, custom_features); diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index b056eff658..5d29526ee1 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -169,6 +169,7 @@ </return> <description> Saves the configuration to the [code]project.godot[/code] file. + [b]Note:[/b] This method is intended to be used by editor plugins, as modified [ProjectSettings] can't be loaded back in the running app. If you want to change project settings in exported projects, use [method save_custom] to save [code]override.cfg[/code] file. </description> </method> <method name="save_custom"> @@ -177,7 +178,7 @@ <argument index="0" name="file" type="String"> </argument> <description> - Saves the configuration to a custom file. The file extension must be [code].godot[/code] (to save in text-based [ConfigFile] format) or [code].binary[/code] (to save in binary format). + Saves the configuration to a custom file. The file extension must be [code].godot[/code] (to save in text-based [ConfigFile] format) or [code].binary[/code] (to save in binary format). You can also save [code]override.cfg[/code] file, which is also text, but can be used in exported projects unlike other formats. </description> </method> <method name="set_initial_value"> |