EditorSettings

    Object that holds the project-independent editor settings.

    Object that holds the project-independent editor settings. These settings are generally visible in the Editor > Editor Settings menu.

    Property names use slash delimiters to distinguish sections. Setting values can be of any type. It’s recommended to use for editor settings to be consistent with the Godot editor itself.

    Accessing the settings can be done using the following methods, such as:

    Note: This class shouldn’t be instantiated directly. Instead, access the singleton using EditorInterface.get_editor_settings.

    • settings_changed ( )

    Emitted after any editor setting has changed.

    • 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.
    • void add_property_info ( info )

    Adds a custom property info to a property. The dictionary must contain:

    • type: int (see )

    • optionally hint: int (see ) and hint_string: String

    Example:

    1. var property_info = {
    2. "name": "category/property_name",
    3. "type": TYPE_INT,
    4. "hint": PROPERTY_HINT_ENUM,
    5. "hint_string": "one,two,three"
    6. }
    7. editor_settings.add_property_info(property_info)

    • void erase ( property )

    Erases the setting whose name is specified by property.


    Returns the list of favorite files and directories for this project.


    Returns project-specific metadata for the section and key specified. If the metadata doesn’t exist, default will be returned instead. See also .


    • 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.


    • get_recent_dirs ( ) const

    Returns the list of recently visited folders in the file dialog for this project.


    • Variant get_setting ( name ) const

    Returns the value of the setting specified by name. This is equivalent to using Object.get on the EditorSettings instance.


    • 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 files

    settings/templates - Where export templates are located


    • bool has_setting ( name ) const

    Returns true if the setting specified by name exists, false otherwise.


    • bool property_can_revert ( name )

    Returns true if the setting specified by can have its value reverted to the default value, false otherwise. When this method returns true, a Revert button will display next to the setting in the Editor Settings.


    • Variant property_get_revert ( name )

    Returns the default value of the setting specified by name. This is the value that would be applied when clicking the Revert button in the Editor Settings.


    Sets the list of favorite files and directories for this project.


    • void set_initial_value ( name, Variant value, update_current )

    Sets the initial value of the setting specified by name to value. This is used to provide a value for the Revert button in the Editor Settings. If update_current is true, the current value of the setting will be set to value as well.


    Sets project-specific metadata with the section, key and data specified. This metadata is stored outside the project folder and therefore won’t be checked into version control. See also .


    Sets the list of recently visited folders in the file dialog for this project.