1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Save editor settings when modified from code

This commit is contained in:
kobewi
2025-10-18 15:55:06 +02:00
parent 7864ac8019
commit 199a4fa4e2
2 changed files with 2 additions and 3 deletions

View File

@@ -6,6 +6,7 @@
<description> <description>
Object that holds the project-independent editor settings. These settings are generally visible in the [b]Editor &gt; Editor Settings[/b] menu. Object that holds the project-independent editor settings. These settings are generally visible in the [b]Editor &gt; Editor Settings[/b] menu.
Property names use slash delimiters to distinguish sections. Setting values can be of any [Variant] type. It's recommended to use [code]snake_case[/code] for editor settings to be consistent with the Godot editor itself. Property names use slash delimiters to distinguish sections. Setting values can be of any [Variant] type. It's recommended to use [code]snake_case[/code] for editor settings to be consistent with the Godot editor itself.
Editor settings are saved automatically when changed.
Accessing the settings can be done using the following methods, such as: Accessing the settings can be done using the following methods, such as:
[codeblocks] [codeblocks]
[gdscript] [gdscript]

View File

@@ -62,10 +62,8 @@ void EditorSettingsDialog::ok_pressed() {
} }
void EditorSettingsDialog::_settings_changed() { void EditorSettingsDialog::_settings_changed() {
if (is_visible()) {
timer->start(); timer->start();
} }
}
void EditorSettingsDialog::_settings_property_edited(const String &p_name) { void EditorSettingsDialog::_settings_property_edited(const String &p_name) {
String full_name = inspector->get_full_item_path(p_name); String full_name = inspector->get_full_item_path(p_name);