GDevelop icon indicating copy to clipboard operation
GDevelop copied to clipboard

[P2P] Add a way to check if a connection was successful

Open arthuro555 opened this issue 3 years ago • 5 comments

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.

arthuro555 avatar Mar 26 '22 21:03 arthuro555

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

4ian avatar May 05 '22 09:05 4ian

Updated the OR to use the new optional async feature!

arthuro555 avatar Jul 13 '22 16:07 arthuro555

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... 🤔

arthuro555 avatar Oct 11 '22 09:10 arthuro555

Bump! I don't remember what my last comment was about, but looking at the code it looks ready to be merged.

arthuro555 avatar Feb 21 '23 23:02 arthuro555