GDevelop
GDevelop copied to clipboard
[P2P] Add a way to check if a connection was successful
Adds a condition to see if the last connection attempt succeeded and an async action to await that result. This is useful to display an error message when a connection failed, or switch to another scene once the connection has been successfully established.
Alright, should we make a "SetOptionallyAsync" and slightly rework the code generation so that it checks if an action is Async or optionnally async and a "await" is set to true on the instruction?
That would avoid duplications of such actions :)
Updated the OR to use the new optional async feature!
Yes, that would be a good idea. Alternatively, I've been thinking, maybe we could try to do the same thing as for the await tween action: use a separate action for awaiting. That would be good for the separation of concerns I think, and make the awaiting even more explicit for users. Of course, that comes at the risk of obscuring the possibility of awaiting... 🤔
Bump! I don't remember what my last comment was about, but looking at the code it looks ready to be merged.