.. Generated automatically by doc/tools/makerst.py in Godot's source tree. .. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead. .. _class_ProjectSettings: ProjectSettings =============== **Inherits:** :ref:`Object` **Category:** Core Brief Description ----------------- Contains global variables accessible from everywhere. Member Functions ---------------- +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_property_info` **(** :ref:`Dictionary` hint **)** | +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`clear` **(** :ref:`String` name **)** | +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_order` **(** :ref:`String` name **)** const | +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Object` | :ref:`get_singleton` **(** :ref:`String` name **)** const | +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`globalize_path` **(** :ref:`String` path **)** const | +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has` **(** :ref:`String` name **)** const | +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has_singleton` **(** :ref:`String` name **)** const | +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`load_resource_pack` **(** :ref:`String` pack **)** | +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`localize_path` **(** :ref:`String` path **)** const | +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`property_can_revert` **(** :ref:`String` name **)** | +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Variant` | :ref:`property_get_revert` **(** :ref:`String` name **)** | +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`save` **(** **)** | +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`save_custom` **(** :ref:`String` file **)** | +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_initial_value` **(** :ref:`String` name, :ref:`Variant` value **)** | +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_order` **(** :ref:`String` name, :ref:`int` pos **)** | +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ Description ----------- Contains global variables accessible from everywhere. Use the normal :ref:`Object` API, such as "ProjectSettings.get(variable)", "ProjectSettings.set(variable,value)" or "ProjectSettings.has(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. Member Function Description --------------------------- .. _class_ProjectSettings_add_property_info: - void **add_property_info** **(** :ref:`Dictionary` hint **)** Add a custom property info to a property. The dictionary must contain: name::ref:`String`(the name of the property) and type::ref:`int`(see TYPE\_\* in :ref:`@Global Scope`), and optionally hint::ref:`int`(see PROPERTY_HINT\_\* in :ref:`@Global Scope`), hint_string::ref:`String`. Example: :: ProjectSettings.set("category/property_name", 0) var property_info = { "name": "category/property_name", "type": TYPE_INT, "hint": PROPERTY_HINT_ENUM, "hint_string": "one,two,three" } ProjectSettings.add_property_info(property_info) .. _class_ProjectSettings_clear: - void **clear** **(** :ref:`String` name **)** Clear the whole configuration (not recommended, may break things). .. _class_ProjectSettings_get_order: - :ref:`int` **get_order** **(** :ref:`String` name **)** const Return the order of a configuration value (influences when saved to the config file). .. _class_ProjectSettings_get_singleton: - :ref:`Object` **get_singleton** **(** :ref:`String` name **)** const .. _class_ProjectSettings_globalize_path: - :ref:`String` **globalize_path** **(** :ref:`String` path **)** const Convert a localized path (res://) to a full native OS path. .. _class_ProjectSettings_has: - :ref:`bool` **has** **(** :ref:`String` name **)** const Return true if a configuration value is present. .. _class_ProjectSettings_has_singleton: - :ref:`bool` **has_singleton** **(** :ref:`String` name **)** const .. _class_ProjectSettings_load_resource_pack: - :ref:`bool` **load_resource_pack** **(** :ref:`String` pack **)** .. _class_ProjectSettings_localize_path: - :ref:`String` **localize_path** **(** :ref:`String` path **)** const Convert a path to a localized path (res:// path). .. _class_ProjectSettings_property_can_revert: - :ref:`bool` **property_can_revert** **(** :ref:`String` name **)** .. _class_ProjectSettings_property_get_revert: - :ref:`Variant` **property_get_revert** **(** :ref:`String` name **)** .. _class_ProjectSettings_save: - :ref:`int` **save** **(** **)** .. _class_ProjectSettings_save_custom: - :ref:`int` **save_custom** **(** :ref:`String` file **)** .. _class_ProjectSettings_set_initial_value: - void **set_initial_value** **(** :ref:`String` name, :ref:`Variant` value **)** .. _class_ProjectSettings_set_order: - void **set_order** **(** :ref:`String` name, :ref:`int` pos **)** Set the order of a configuration value (influences when saved to the config file).