summaryrefslogtreecommitdiff
path: root/modules/gdscript/doc_classes
diff options
context:
space:
mode:
authorRaul Santos <raulsntos@gmail.com>2022-03-16 17:58:35 +0100
committerRaul Santos <raulsntos@gmail.com>2022-08-08 15:40:32 +0200
commite47ba810507c15e57429a78b50f7cd8197d09bd0 (patch)
tree5c791f41ae094ddbdbe0c1a707849c9b6b9606ad /modules/gdscript/doc_classes
parent87a1bca37bda8f45f987ac1fdaa78459d8844c08 (diff)
Add `@GDScript.type_exists` documentation
Diffstat (limited to 'modules/gdscript/doc_classes')
-rw-r--r--modules/gdscript/doc_classes/@GDScript.xml5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/gdscript/doc_classes/@GDScript.xml b/modules/gdscript/doc_classes/@GDScript.xml
index 10cf783e73..8ca65f0004 100644
--- a/modules/gdscript/doc_classes/@GDScript.xml
+++ b/modules/gdscript/doc_classes/@GDScript.xml
@@ -239,6 +239,11 @@
<return type="bool" />
<argument index="0" name="type" type="StringName" />
<description>
+ Returns whether the given [Object]-derived class exists in [ClassDB]. Note that [Variant] data types are not registered in [ClassDB].
+ [codeblock]
+ type_exists("Sprite2D") # Returns true
+ type_exists("NonExistentClass") # Returns false
+ [/codeblock]
</description>
</method>
</methods>