EditorSettings
Inherits: Resource < Reference < Object Object that holds the project-independent editor settings.
Description
Editor > Editor Settings menu.
Variant type. It’s recommended to use snake_case for editor settings to be consistent with the Godot editor itself.
Accessing the settings can be done using the following methods, such as:
# `settings.set("some/property", value)` also works as this class overrides `_set()` internally.settings.set_setting("some/property",value)# `settings.get("some/property", value)` also works as this class overrides `_get()` internally.settings.get_setting("some/property")var list_of_settings = settings.get_property_list()
Note: This class shouldn’t be instantiated directly. Instead, access the singleton using EditorInterface.get_editor_settings.
Methods
Signals
- settings_changed ( )
Emitted after any editor setting has changed.
Constants
- NOTIFICATION_EDITOR_SETTINGS_CHANGED = 10000 —- Emitted after any editor setting has changed. It’s used by various editor plugins to update their visuals on theme changes or logic on configuration changes.
Method Descriptions
- add_property_info ( Dictionary info ) Adds a custom property info to a property. The dictionary must contain:
name: String (the name of the property)type: int (see Variant.Type)hint: int (see PropertyHint) andhint_string: String Example:editor_settings.set("category/property_name", 0)var property_info = { "name": "category/property_name", "type": TYPE_INT, "hint": PROPERTY_HINT_ENUM, "hint_string": "one,two,three"}editor_settings.add_property_info(property_info)
- erase ( String property )
property.
- PoolStringArray get_favorites ( ) const Returns the list of favorite files and directories for this project.
- Variant get_project_metadata ( String section, String key, Variant default=null ) const
sectionandkeyspecified. If the metadata doesn’t exist,defaultwill be returned instead. See also set_project_metadata.
- String get_project_settings_dir ( ) const Returns the project-specific settings path. Projects all have a unique subdirectory inside the settings path where project-specific settings are saved.
- PoolStringArray get_recent_dirs ( ) const Returns the list of recently visited folders in the file dialog for this project.
- Variant get_setting ( String name ) const
name. This is equivalent to using Object.get on the EditorSettings instance.
- String get_settings_dir ( ) const
Gets the global settings path for the engine. Inside this path, you can find some standard paths such as:
settings/tmp- Used for temporary storage of filessettings/templates- Where export templates are located
- bool has_setting ( String name ) const
trueif the setting specified bynameexists,falseotherwise.
- bool property_can_revert ( String name )
trueif the setting specified bynamecan have its value reverted to the default value,falseotherwise. When this method returnstrue, a Revert button will display next to the setting in the Editor Settings.
- Variant property_get_revert ( String name )
name. This is the value that would be applied when clicking the Revert button in the Editor Settings.
- set_favorites ( PoolStringArray dirs ) Sets the list of favorite files and directories for this project.
- set_initial_value ( String name, Variant value, bool update_current )
nametovalue. This is used to provide a value for the Revert button in the Editor Settings. Ifupdate_currentis true, the current value of the setting will be set tovalueas well.
- set_project_metadata ( String section, String key, Variant data )
section,keyanddataspecified. This metadata is stored outside the project folder and therefore won’t be checked into version control. See also get_project_metadata.
- set_recent_dirs ( PoolStringArray dirs ) Sets the list of recently visited folders in the file dialog for this project.
- set_setting ( String name, Variant value )
valueof the setting specified byname. This is equivalent to using Object.set on the EditorSettings instance.
