Prechádzať zdrojové kódy

Merge pull request #32356 from m-r-hunt/master

Improve documentation of ProjectSettings class
Rémi Verschelde 5 rokov pred
rodič
commit
ba8b2a1af7
1 zmenil súbory, kde vykonal 6 pridanie a 0 odobranie
  1. 6 0
      doc/classes/ProjectSettings.xml

+ 6 - 0
doc/classes/ProjectSettings.xml

@@ -5,6 +5,7 @@
 	</brief_description>
 	<description>
 		Contains global variables accessible from everywhere. Use [method get_setting], [method set_setting] or [method has_setting] to access them. Variables stored in [code]project.godot[/code] are also loaded into ProjectSettings, making this object very useful for reading custom game configuration options.
+		When naming a Project Settings property, use the full path to the setting including the category. For example, [code]"application/config/name"[/code] for the project name. Category and property names can be viewed in the Project Settings dialog.
 	</description>
 	<tutorials>
 	</tutorials>
@@ -55,6 +56,11 @@
 			<argument index="0" name="name" type="String">
 			</argument>
 			<description>
+				Returns the value of a setting.
+				[b]Example:[/b]
+				[codeblock]
+				print(ProjectSettings.get_setting("application/config/name"))
+				[/codeblock]
 			</description>
 		</method>
 		<method name="globalize_path" qualifiers="const">