Await next frame in godot 4?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By rakkarage

It used to be possible to wait for next frame by doing this?

yield(get_tree(), "idle_frame")

How can i do this in godot4? i tried:

await get_tree().idle_frame

But not work…
Please & Thanks.

1 Like
:bust_in_silhouette: Reply From: Geazas

try await get_tree().process_frame

W 0:00:00:0989 “await” keyword not needed in this case, because the expression isn’t a coroutine nor a signal.

i guess it works, gives a warning, but better then an error idk

rakkarage | 2022-02-03 15:59