summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
authorbitsawer <sawerduster@gmail.com>2023-02-03 20:37:52 +0200
committerbitsawer <sawerduster@gmail.com>2023-02-04 23:22:27 +0200
commitd1521933bbfb9d5f9bab4059623e41762e727d6f (patch)
tree49ee8c71dffaaa700c5c4b3ccc85a3e9db48e51c /doc/classes
parent0b1d516f67a3b2b7dd158b923559f192ec103a85 (diff)
Expose and document ProjectSettings.get_global_class_list()
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/ProjectSettings.xml12
-rw-r--r--doc/classes/Variant.xml2
2 files changed, 13 insertions, 1 deletions
diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml
index e429759e93..1fa906d75c 100644
--- a/doc/classes/ProjectSettings.xml
+++ b/doc/classes/ProjectSettings.xml
@@ -60,6 +60,18 @@
Clears the whole configuration (not recommended, may break things).
</description>
</method>
+ <method name="get_global_class_list">
+ <return type="Dictionary[]" />
+ <description>
+ Returns an [Array] of registered global classes. Each global class is represented as a [Dictionary] that contains the following entries:
+ - [code]base[/code] is a name of the base class;
+ - [code]class[/code] is a name of the registered global class;
+ - [code]icon[/code] is a path to a custom icon of the global class, if it has any;
+ - [code]language[/code] is a name of a programming language in which the global class is written;
+ - [code]path[/code] is a path to a file containing the global class.
+ [b]Note:[/b] Both the script and the icon paths are local to the project filesystem, i.e. they start with [code]res://[/code].
+ </description>
+ </method>
<method name="get_order" qualifiers="const">
<return type="int" />
<param index="0" name="name" type="String" />
diff --git a/doc/classes/Variant.xml b/doc/classes/Variant.xml
index 5416468ab6..17a29f0507 100644
--- a/doc/classes/Variant.xml
+++ b/doc/classes/Variant.xml
@@ -38,7 +38,7 @@
# To get the name of the underlying Object type, you need the `get_class()` method.
print("foo is a(n) %s" % foo.get_class()) # inject the class name into a formatted string.
# Note also that there is not yet any way to get a script's `class_name` string easily.
- # To fetch that value, you can parse the [code]res://.godot/global_script_class_cache.cfg[/code] file with the [ConfigFile] API.
+ # To fetch that value, you can use [member ProjectSettings.get_global_class_list].
# Open your project.godot file to see it up close.
[/gdscript]
[csharp]