Godot Version
4.2.1
Question
How do I cast an untyped array (or an array of supertype) to a typed array?
For example, this does not work:
node.find_children("", "Interactable") as Array[Interactable]
Error:
Trying to assign an array of type "Array[Node]" to a variable of type "Array[Interactable]".
I do wish gdscript had some form of generics, or if types could be variables, so we could just do something like this:
node.find_children_of_type(Interactable)