Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yield syntax #168

Open
rac0316 opened this issue May 5, 2020 · 3 comments
Open

Yield syntax #168

rac0316 opened this issue May 5, 2020 · 3 comments

Comments

@rac0316
Copy link

rac0316 commented May 5, 2020

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?

@touilleMan
Copy link
Owner

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 ;-)

@matheus2740
Copy link
Contributor

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

@filantus
Copy link

filantus commented Mar 2, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants