I made a custom function to make my life easier with delays, it's called "wait(seconds)", but for some reason it doesn't work.
extends Control
func _ready():
wait(2)
$WindowDialog.popup()
func wait(seconds):
yield(get_tree().create_timer(seconds), "timeout")
But yield works perfectly fine. Is there anything wrong in the code?