docs.unity3d.com
    Show / Hide Table of Contents

    Class PlayerInfo

    Contains Player Information

    Inheritance
    Object
    PlayerInfo
    Namespace: Unity.Services.Authentication
    Syntax
    public sealed class PlayerInfo

    Properties

    CreatedAt

    Player Creation DateTime in UTC

    Declaration
    public DateTime? CreatedAt { get; }
    Property Value
    Type Description
    Nullable<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>

    Methods

    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

    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
    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023