Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Inces |
Nowhere in docs, nowhere in editor help. I am trying to find type 17.
Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Inces |
Nowhere in docs, nowhere in editor help. I am trying to find type 17.
Reply From: | Gluon |
It allows you to determine what a variable is so if you use typeof() with a variable from an array for example you can find out if it is an integer or something else.
Found this in the documentation here
GDScript reference — Godot Engine (stable) documentation in English
Variable pattern
Matches the contents of a variable/enum:
match typeof(x):
TYPE_REAL:
print("float")
TYPE_STRING:
print("text")
TYPE_ARRAY:
print("array")
Gluon | 2021-12-09 20:14
There are just 3 examples od enum I was looking for, but that actually helped, I could find the rest by typing TYPE_. Link in Godot editor help is misleading. Thanks
Inces | 2021-12-09 20:24