Table of Contents

PlayerAccount

class in Coherence.Cloud

Represents a player account that has logged in to coherence Cloud.

Properties
All

Gets a list containing all player accounts that are currently logged in to coherence Cloud locally.

If no player accounts are logged in, an empty list is returned.

AvatarUrl

The URL of the public avatar image for the player account.

DisplayName

The public display name of the player account.

GuestId

Guest identifier for the player account if they have logged in as a guest.

Id

The globally unique identifier for the player account.

IsGuest

Gets a value indicating whether this PlayerAccount is a guest account.

IsLoggedIn

Is this player account logged in to coherence Cloud?

IsMain

Gets a value indicating whether this is the main player account.

IsNewPlayer

Is this a newly created player account?

IsVerified

Indicates whether the player account is verified.

Main

Gets the current main player account that has logged in to coherence Cloud locally. By default, this returns the first player account that has logged in to coherence Cloud using any authentication method.

If no player accounts are logged in, this will be null.

The main player account can also be manually set to a desired player account using SetAsMain().

Services

Coherence cloud services for this player account. The player account needs to be logged in to coherence Cloud before they can use most of the services.

SessionToken

Token uniquely identifying the player account once it has successfully logged-in.

The token can be stored on the user's device locally, and later used to log in to coherence Cloud again using the same credentials, without the user needing to provide them again.

Username

Username associated with the player account, if it has been given one; otherwise, an empty string.

Methods
Dispose

Removes this player account from the list of all player accounts, logs them out from coherence Cloud, and releases all resources used by it.

Equals
Finalize
Find

Retrieves the first player account that matches the conditions defined by the specified predicate.

FindAll

Retrieves all player accounts that match the conditions defined by the specified predicate.

GetHashCode
GetInfo

Gets all the data associated with this player account from coherence Cloud.

GetMainAsync

Gets a task that returns the main player account when one has started or finished logging in.

GetOneTimeCode

Acquire a one-time code that can be used with LoginWithOneTimeCode(string, CancellationToken).

LinkEpicGames

Adds Steam authentication to the current player account.

LinkGuest

Links the guest id to the current player account.

LinkJwt

Adds custom JSON Web Token (JWT) authentication to the current player account.

LinkNintendo

Adds Nintendo Services Account authentication to the current player account.

LinkPlayStation

Adds PlayStation Network authentication to the current player account.

LinkSteam

Adds Steam authentication to the current player account.

LinkXbox

Adds Xbox account authentication to the current player account.

Logout

Logs this player account out from coherence Cloud. If this player account is not logged in, this method does nothing.

RemoveDisplayInfo

Remove display name and avatar image from the current player account.

RemoveEmail

Remove the email address from the current player account.

RemoveUsername

Remove the username from the current player account.

SetAsMain

Makes this PlayerAccount the main player account.

SetDisplayInfo

Assign a display name and an optional avatar image URL to the current player account.

SetEmail

Assign an email address to the current player account.

SetUsername

Assign a unique username and an optional password to the current player account.

ToString
UnlinkEpicGames

Removes Steam authentication from the current player account.

UnlinkGuest

Removes guest authentication from the current player account.

UnlinkJwt

Removes custom JSON Web Token (JWT) authentication from the current player account.

UnlinkNintendo

Removes Nintendo Services Account authentication from the current player account.

UnlinkPlayStation

Removes PlayStation Network authentication from the current player account.

UnlinkSteam

Removes Steam authentication from the current player account.

UnlinkXbox

Removes Xbox account authentication from the current player account.

Events
OnMainChanged

Event that is raised when the first player account starts logging in to coherence Cloud, when the main player account is changed to a different one using SetAsMain(), and when the main player account logs out from coherence cloud.

OnMainLoggedIn

Event that is raised whenever the main player account changes to a different one. The event is raised when the first player account that started logging in to coherence Cloud successfully completes their login process, when a different player account is set as the main player account using SetAsMain(), and when the player account that was previously the main player account has been logged out from coherence cloud.

Operators
op_Equality
op_Implicit
op_Inequality