Godot Version
v4.3.stable.official [77dcf97d8]
Question
Is there any equivalent of call_deferred() that takes a closure as a parameter?
v4.3.stable.official [77dcf97d8]
Is there any equivalent of call_deferred() that takes a closure as a parameter?
func _ready() -> void:
var callable = func(): print("second")
print("first")
callable.call_deferred()
print("third")
Will print:
first
third
second
You can do the same with all other functions like:
func _ready() -> void:
print("first")
print.call_deferred("second")
print("third")
Will print the same as the example above.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.