LoginOperation
Represents an asynchronous operation attempting to login to coherence Cloud.
Remarks
An async method can await the LoginOperation to wait until the operation has completed.
Similarly, a Coroutine can yield the LoginOperation to wait for it to complete.
ContinueWith(Action, TaskContinuationOptions) can also be used to perform an action after the operation has completed.
OnSuccess(Action<PlayerAccount>) and OnFail(Action<LoginOperationError>) can be used to perform different actions based on whether the operation was successful or not.
If LoginOperation.HasFailed is true, then the operation has failed. If this is the case, then LoginOperation.Error will be non-null and contain additional information about the error.
If a LoginOperation fails, and the error is not handled in any way (LoginOperation.HasFailed is not checked, LoginOperation.Error is not accessed, OnFail(Action<LoginOperationError>) is not used, etc.), then the error will automatically be logged to the Console at some point (whenever the garbage collector releases the LoginOperationError from memory).
Properties
| LobbyIds | Identifiers of all lobbies that the logged-in player account has joined. |
Methods
| ContinueWith | Specify an action to perform after the operation has completed (LoginOperation.IsCompleted becomes true. |
| GetAwaiter | Gets an object that can be used to await for this operation to complete. |
| OnFail | Specify an action to perform if the operation fails (LoginOperation.HasFailed becomes true). |
| OnSuccess | Specify an action to perform if the operation completes successfully (LoginOperation.IsCompletedSuccessfully becomes true). |