Add @GDScript.type_exists
documentation
This commit is contained in:
parent
87a1bca37b
commit
e47ba81050
@ -239,6 +239,11 @@
|
|||||||
<return type="bool" />
|
<return type="bool" />
|
||||||
<argument index="0" name="type" type="StringName" />
|
<argument index="0" name="type" type="StringName" />
|
||||||
<description>
|
<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>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
</methods>
|
</methods>
|
||||||
|
Loading…
Reference in New Issue
Block a user