Add a type conversion method to Variant Utility and expose to scripting

This commit is contained in:
Aaron Franke committed 2023-09-08 10:12:48 -05:00
1 parent 8c1817f755
commit 6f7eccc758
4 files changed
+108 -1

No files matched your search

+2 -1
View File
@@ -57,11 +57,12 @@
[/codeblock]
</description>
</method>
<method name="convert">
<method name="convert" is_deprecated="true">
<return type="Variant" />
<param index="0" name="what" type="Variant" />
<param index="1" name="type" type="int" />
<description>
[i]Deprecated.[/i] Use [method @GlobalScope.type_convert] instead.
Converts [param what] to [param type] in the best way possible. The [param type] uses the [enum Variant.Type] values.
[codeblock]
var a = [4, 2.5, 1.2]