Skip to content
Discussion options

You must be logged in to vote

Right, we're doing the same. However in the case where you have a screen with two possible buttons, modelling that as a series of asynchronous awaits like you're doing with the WhenAny starts making less sense.

Interacting with multiple possibilities is usually more event based. What we do is the following:

When a User navigates to a screen, we start up that screen and the screen returns a UniTask that we can await in the parent screen.
However unless its something simple like a dialog that can only have one possible interaction, we do not return a composition of UniTasks like you do. What we do instead is the following:

UniTaskCompletionSource _completionSource;

defined at the class level.

Replies: 6 comments 15 replies

Comment options

You must be logged in to vote
1 reply
@OrionFive
Comment options

Comment options

You must be logged in to vote
2 replies
@OrionFive
Comment options

@Blackclaws
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
11 replies
@OrionFive
Comment options

@Blackclaws
Comment options

@OrionFive
Comment options

@Blackclaws
Comment options

Answer selected by OrionFive
@krisrok
Comment options

@Blackclaws
Comment options

@OrionFive
Comment options

@MeisterDerMagie
Comment options

Comment options

You must be logged in to vote
1 reply
@MeisterDerMagie
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
9 participants