Class PlayerInfo
Contains Player Information
Inherited Members
Namespace: Unity.Services.Authentication
Assembly: Unity.Services.Authentication.dll
Syntax
public sealed class PlayerInfo
Properties
CreatedAt
Player Creation DateTime in UTC
Declaration
public DateTime? CreatedAt { get; }
Property Value
Type | Description |
---|---|
Date |
Id
Player Id
Declaration
public string Id { get; }
Property Value
Type | Description |
---|---|
string |
Identities
Player Identities
Declaration
public List<Identity> Identities { get; }
Property Value
LastPasswordUpdate
Last time the password was updated for the username/password account or null if none is set
Declaration
[CanBeNull]
public DateTime? LastPasswordUpdate { get; }
Property Value
Type | Description |
---|---|
Date |
Username
Username associated with the username/password account or null if none is set
Declaration
[CanBeNull]
public string Username { get; }
Property Value
Type | Description |
---|---|
string |
Methods
GetAppleGameCenterId()
Returns the player's AppleGameCenter teamPlayerID if one has been linked.
Declaration
public string GetAppleGameCenterId()
Returns
Type | Description |
---|---|
string | The player's AppleGameCenter teamPlayerID |
GetAppleId()
Returns the player's Sign in with Apple id if one has been linked.
Declaration
public string GetAppleId()
Returns
Type | Description |
---|---|
string | The player's Sign in with Apple id |
GetCustomId()
Returns the player's custom id if one has been linked
Declaration
public string GetCustomId()
Returns
Type | Description |
---|---|
string | The player's custom id |
GetFacebookId()
Returns the player's facebook id if one has been linked.
Declaration
public string GetFacebookId()
Returns
Type | Description |
---|---|
string | The player's facebook id |
GetGoogleId()
Returns the player's Google id if one has been linked.
Declaration
public string GetGoogleId()
Returns
Type | Description |
---|---|
string | The player's Google id |
GetGooglePlayGamesId()
Returns the player's Google Play Games id if one has been linked.
Declaration
public string GetGooglePlayGamesId()
Returns
Type | Description |
---|---|
string | The player's Google Play Games id |
GetOculusId()
Returns the player's Oculus OrgScopedID if one has been linked.
Declaration
public string GetOculusId()
Returns
Type | Description |
---|---|
string | The player's Oculus OrgScopedID |
GetOpenIdConnectId(string)
Returns the player's id if one has been linked with a given OpenID Connect id provider.
Declaration
public string GetOpenIdConnectId(string idProviderName)
Parameters
Type | Name | Description |
---|---|---|
string | idProviderName | the name of the id provider created. Note that it must start with "oidc-" and have between 1 and 20 characters |
Returns
Type | Description |
---|---|
string | The player's id |
GetOpenIdConnectIdProviders()
Get all OpenID Connect id providers linked to the player
Declaration
public List<Identity> GetOpenIdConnectIdProviders()
Returns
GetSteamId()
Returns the player's steam id if one has been linked.
Declaration
public string GetSteamId()
Returns
Type | Description |
---|---|
string | The player's Steam id |
GetUnityId()
Returns the player's Unity id if one has been linked
Declaration
public string GetUnityId()
Returns
Type | Description |
---|---|
string | The player's Unity id |