godot-python icon indicating copy to clipboard operation
godot-python copied to clipboard

Yield syntax

Open rac0316 opened this issue 5 years ago • 3 comments

I would like to use the GDScript yield function in a .py file, but I'm not sure how to form the syntax or if it's supported.

GDScript syntax example: yield(get_tree(), "idle_frame") yield(VisualServer, "frame_post_draw")

Is this possible in Godot Python?

rac0316 avatar May 05 '20 00:05 rac0316

Hi @rac0316, Yeld syntax for crossing bound between Godot and Python is not supported

I'm not sure it is even possible to implement this with the current GDnative API... Now is a good time to check this and provide some PRs for Godot 4 ;-)

touilleMan avatar May 30 '20 11:05 touilleMan

Also I read somewhere that yield will be deprecated in favor of await in GDScript, so waiting for godot 4 sounds wise.

matheus2740 avatar Jul 03 '20 21:07 matheus2740

Yep, Godot 4 stable was released and there isn't yield available. img

filantus avatar Mar 02 '23 23:03 filantus