GetMainAsync
Methods
public static CoherenceTask<PlayerAccount> GetMainAsync(CancellationToken cancellationToken = default)
Gets a task that returns the main player account when one exist and has finished logging in.
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | Can be used to cancel the operation. |
Returns
Type | Description |
---|---|
CoherenceTask<PlayerAccount> | Task that can be await to get the main player account. |
Remarks
When the task completes IsLoggedIn will be true, and its cloud services will be usable.
public static CoherenceTask<PlayerAccount> GetMainAsync(bool waitUntilLoggedIn, CancellationToken cancellationToken = default)
Gets a task that returns the main player account when one has started or finished logging in.
Parameters
Type | Name | Description |
---|---|---|
bool | waitUntilLoggedIn | If true, the task will complete when a main player account exists and has finished logging in. At this point IsLoggedIn will be true, and cloud services are usable. If false, the task will complete when a main player account exists, even if they are still in the process of logging in. At this point IsLoggedIn might still be false, and cloud services might not be usable. |
CancellationToken | cancellationToken | Can be used to cancel the operation. |
Returns
Type | Description |
---|---|
CoherenceTask<PlayerAccount> | Task that can be await to get the main player account. |