EditorSettings

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 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:

More...

Members

Aliases

BaseClasses
alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses)
Undocumented in source.

Enums

Constants
enum Constants

Functions

addPropertyInfo
void addPropertyInfo(Dictionary info)

Adds a custom property info to a property. The dictionary must contain: - name: String (the name of the property) - type: long (see Variant.type) - optionally hint: long (see propertyhint) and hint_string: String Example:

erase
void erase(String property)

Erases the setting whose name is specified by property.

getFavorites
PoolStringArray getFavorites()

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

getProjectMetadata
Variant getProjectMetadata(String section, String key, VariantArg2 _default)

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

getProjectSettingsDir
String getProjectSettingsDir()

Returns the project-specific settings path. Projects all have a unique subdirectory inside the settings path where project-specific settings are saved.

getRecentDirs
PoolStringArray getRecentDirs()

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

getSetting
Variant getSetting(String name)

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

getSettingsDir
String getSettingsDir()

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

hasSetting
bool hasSetting(String name)

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

opAssign
typeof(null) opAssign(typeof(null) n)
opEquals
bool opEquals(EditorSettings other)
opEquals
bool opEquals(typeof(null) n)
propertyCanRevert
bool propertyCanRevert(String name)

Returns true if the setting specified by name 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.

propertyGetRevert
Variant propertyGetRevert(String 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.

setFavorites
void setFavorites(PoolStringArray dirs)

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

setInitialValue
void setInitialValue(String name, VariantArg1 value, bool 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.

setProjectMetadata
void setProjectMetadata(String section, String key, VariantArg2 data)

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

setRecentDirs
void setRecentDirs(PoolStringArray dirs)

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

setSetting
void setSetting(String name, VariantArg1 value)

Sets the value of the setting specified by name. This is equivalent to using GodotObject.set on the EditorSettings instance.

toHash
size_t toHash()

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Static functions

_new
EditorSettings _new()

Construct a new instance of EditorSettings. Note: use memnew!EditorSettings instead.

Static variables

_classBindingInitialized
bool _classBindingInitialized;
Undocumented in source.

Structs

GDNativeClassBinding
struct GDNativeClassBinding
Undocumented in source.

Unions

__anonymous
union __anonymous
Undocumented in source.

Variables

_GODOT_internal_name
enum string _GODOT_internal_name;
Undocumented in source.

Mixed In Members

From mixin baseCasts

as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(ToRef) as()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(ToRef)
Undocumented in source.
opCast
void* opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
godot_object opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
bool opCast()
Undocumented in source. Be warned that the author may not have intended to support it.

Detailed Description

# 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.getEditorSettings.

Meta