ProjectSettingsSingleton

Contains global variables accessible from everywhere.

Use "ProjectSettings.get_setting(variable)", "ProjectSettings.set_setting(variable,value)" or "ProjectSettings.has_setting(variable)" to access them. Variables stored in project.godot are also loaded into ProjectSettings, making this object very useful for reading custom game configuration options.

Members

Aliases

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

Functions

addPropertyInfo
void addPropertyInfo(Dictionary hint)

Add a custom property info to a property. The dictionary must contain: name:String(the name of the property) and type:long(see TYPE_* in @GlobalScope), and optionally hint:long(see PROPERTY_HINT_* in @GlobalScope), hint_string:String.

clear
void clear(StringArg0 name)

Clear the whole configuration (not recommended, may break things).

getOrder
long getOrder(StringArg0 name)

Return the order of a configuration value (influences when saved to the config file).

getSetting
Variant getSetting(StringArg0 name)
globalizePath
String globalizePath(StringArg0 path)

Convert a localized path (res://) to a full native OS path.

hasSetting
bool hasSetting(StringArg0 name)

Return true if a configuration value is present.

loadResourcePack
bool loadResourcePack(StringArg0 pack)

Loads the contents of the .pck or .zip file specified by pack into the resource filesystem (res://). Returns true on success. Note: If a file from pack shares the same path as a file already in the resource filesystem, any attempts to load that file will use the file from pack.

localizePath
String localizePath(StringArg0 path)

Convert a path to a localized path (res:// path).

opAssign
ProjectSettingsSingleton opAssign(T n)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(ProjectSettingsSingleton other)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(typeof(null) n)
Undocumented in source. Be warned that the author may not have intended to support it.
propertyCanRevert
bool propertyCanRevert(StringArg0 name)

Returns true if the specified property exists and its initial value differs from the current value.

propertyGetRevert
Variant propertyGetRevert(StringArg0 name)

Returns the initial value of the specified property. Returns null if the property does not exist.

save
GodotError save()

Saves the configuration to the project.godot file.

saveCustom
GodotError saveCustom(StringArg0 file)

Saves the configuration to a custom file.

setInitialValue
void setInitialValue(StringArg0 name, VariantArg1 value)
setOrder
void setOrder(StringArg0 name, long position)

Set the order of a configuration value (influences when saved to the config file).

setSetting
void setSetting(StringArg0 name, VariantArg1 value)

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Static functions

_new
ProjectSettingsSingleton _new()
Undocumented in source. Be warned that the author may not have intended to support it.

Static variables

_classBindingInitialized
bool _classBindingInitialized;
Undocumented in source.

Structs

_classBinding
struct _classBinding
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
To as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
To as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
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.

Meta