2017-09-12 20:42:36 +00:00
<?xml version="1.0" encoding="UTF-8" ?>
2018-07-31 18:13:10 +00:00
<class name= "ProjectSettings" inherits= "Object" category= "Core" version= "3.0.7" >
2017-09-12 20:42:36 +00:00
<brief_description >
Contains global variables accessible from everywhere.
</brief_description>
<description >
2018-01-26 08:17:53 +00:00
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.
2017-09-12 20:42:36 +00:00
</description>
<tutorials >
</tutorials>
<demos >
</demos>
<methods >
<method name= "add_property_info" >
<return type= "void" >
</return>
<argument index= "0" name= "hint" type= "Dictionary" >
</argument>
<description >
2017-11-15 17:45:34 +00:00
Add a custom property info to a property. The dictionary must contain: name:[String](the name of the property) and type:[int](see TYPE_* in [@GlobalScope]), and optionally hint:[int](see PROPERTY_HINT_* in [@GlobalScope]), hint_string:[String].
2017-09-12 20:42:36 +00:00
Example:
[codeblock]
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)
[/codeblock]
</description>
</method>
<method name= "clear" >
<return type= "void" >
</return>
<argument index= "0" name= "name" type= "String" >
</argument>
<description >
Clear the whole configuration (not recommended, may break things).
</description>
</method>
<method name= "get_order" qualifiers= "const" >
<return type= "int" >
</return>
<argument index= "0" name= "name" type= "String" >
</argument>
<description >
Return the order of a configuration value (influences when saved to the config file).
</description>
</method>
2017-10-11 21:54:43 +00:00
<method name= "get_setting" qualifiers= "const" >
<return type= "Variant" >
</return>
<argument index= "0" name= "name" type= "String" >
</argument>
<description >
</description>
</method>
2017-09-12 20:42:36 +00:00
<method name= "globalize_path" qualifiers= "const" >
<return type= "String" >
</return>
<argument index= "0" name= "path" type= "String" >
</argument>
<description >
Convert a localized path (res://) to a full native OS path.
</description>
</method>
2017-10-11 21:54:43 +00:00
<method name= "has_setting" qualifiers= "const" >
2017-09-12 20:42:36 +00:00
<return type= "bool" >
</return>
<argument index= "0" name= "name" type= "String" >
</argument>
<description >
Return true if a configuration value is present.
</description>
</method>
<method name= "load_resource_pack" >
<return type= "bool" >
</return>
<argument index= "0" name= "pack" type= "String" >
</argument>
<description >
2018-10-02 09:07:44 +00:00
Loads the contents of the .pck or .zip file specified by [code]pack[/code] into the resource filesystem (res://). Returns true on success.
Note: If a file from [code]pack[/code] shares the same path as a file already in the resource filesystem, any attempts to load that file will use the file from [code]pack[/code].
2017-09-12 20:42:36 +00:00
</description>
</method>
<method name= "localize_path" qualifiers= "const" >
<return type= "String" >
</return>
<argument index= "0" name= "path" type= "String" >
</argument>
<description >
Convert a path to a localized path (res:// path).
</description>
</method>
<method name= "property_can_revert" >
<return type= "bool" >
</return>
<argument index= "0" name= "name" type= "String" >
</argument>
<description >
2018-10-31 12:29:33 +00:00
Returns true if the specified property exists and its initial value differs from the current value.
2017-09-12 20:42:36 +00:00
</description>
</method>
<method name= "property_get_revert" >
<return type= "Variant" >
</return>
<argument index= "0" name= "name" type= "String" >
</argument>
<description >
2018-10-31 12:29:33 +00:00
Returns the initial value of the specified property. Returns null if the property does not exist.
2017-09-12 20:42:36 +00:00
</description>
</method>
<method name= "save" >
<return type= "int" enum= "Error" >
</return>
<description >
2018-10-31 12:29:33 +00:00
Saves the configuration to the project.godot file.
2017-09-12 20:42:36 +00:00
</description>
</method>
<method name= "save_custom" >
<return type= "int" enum= "Error" >
</return>
<argument index= "0" name= "file" type= "String" >
</argument>
<description >
2018-10-31 12:29:33 +00:00
Saves the configuration to a custom file.
2017-09-12 20:42:36 +00:00
</description>
</method>
<method name= "set_initial_value" >
<return type= "void" >
</return>
<argument index= "0" name= "name" type= "String" >
</argument>
<argument index= "1" name= "value" type= "Variant" >
</argument>
<description >
</description>
</method>
<method name= "set_order" >
<return type= "void" >
</return>
<argument index= "0" name= "name" type= "String" >
</argument>
2017-09-10 13:37:49 +00:00
<argument index= "1" name= "position" type= "int" >
2017-09-12 20:42:36 +00:00
</argument>
<description >
Set the order of a configuration value (influences when saved to the config file).
</description>
</method>
2017-10-11 21:54:43 +00:00
<method name= "set_setting" >
<return type= "void" >
</return>
<argument index= "0" name= "name" type= "String" >
</argument>
<argument index= "1" name= "value" type= "Variant" >
</argument>
<description >
</description>
</method>
2017-09-12 20:42:36 +00:00
</methods>
<constants >
</constants>
</class>