Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | The_Black_Chess_King |
In the documentation it says:
FUNCREF
Description: In GDScript, functions are not first-class objects. This means it is impossible to store them directly as variables, return them from another function, or pass them as arguments.
However, by creating a FuncRef using the @GDScript.funcref function, a reference to a function in a given object can be created, passed around and called.
I didn’t understood. It’s like editing functions on the fly or passing functions as an argument?