docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class PlayerInfo

    Contains Player Information

    Inheritance
    object
    PlayerInfo
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    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
    DateTime?

    Id

    Player Id

    Declaration
    public string Id { get; }
    Property Value
    Type Description
    string

    Identities

    Player Identities

    Declaration
    public List<Identity> Identities { get; }
    Property Value
    Type Description
    List<Identity>

    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
    DateTime?

    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
    Type Description
    List<Identity>

    A list of all OpenID Connect id providers

    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

    Events

    InfoChanged

    Raised when a value changes

    Declaration
    public event Action<PlayerInfo> InfoChanged
    Event Type
    Type Description
    Action<PlayerInfo>
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)