-
Notifications
You must be signed in to change notification settings - Fork 108
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
Godot 4.0 yield changed to await #382
Comments
It appears the compiler knows when a function has an It is not clear what happens if the function that contains Many times I've gotten around this by yielding to an idle frame if nothing yielded so that the caller does not have to check. The new way may need a bit of finesse to work. |
When Ex: |
Since the new await uses Also, Actually...with the new approach we might not need any signal. Maybe it can just be Last thought |
|
There does appear to be a flag for coroutines, but it is on the return class. This is not set for every method that contains an See the different values for
|
Made an issue about metadata for 4.0 godotengine/godot#64236 |
As of now, The
The replacements are:
|
Sorry, I'm confused... how do I await a signal if no signals are sent, since the main game loop isn't running? I have a tree of nodes I've built in-script that send signals to eachother in complex ways, and I want to test the interaction, but no signals can be sent, and so the await never ends. If you want to take a look at what I mean, the test I'm working on is here. |
I believe your issue is because your test world has not been added to the tree. The game loop is running, I think you just need to call Then, prior to asserting you would use
|
These are allllll done now. |
yield
has been replaced withawait
.await
looks completely different. Should be fun.The text was updated successfully, but these errors were encountered: