Lambda Functions in gdscript can be put in place of a Callable
. They are custom Callables
that are not associated with Object
instance, but they can be named
var my_lambda = func(msg):
print(message)
my_lambda.call("Hello")
button_pressed.connect(func(): print("Button Pressed!"))