docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class LeaderboardEntry

    Represents a score entry for an Instant Game leaderboard.

    Inheritance
    object
    JsObject
    LeaderboardEntry
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Meta.InstantGames
    Assembly: Unity.Meta.InstantGames.Sdk.dll
    Syntax
    public class LeaderboardEntry : JsObject

    Constructors

    LeaderboardEntry()

    Construct an instance of LeaderboardEntry

    Declaration
    public LeaderboardEntry()

    Methods

    GetExtraData()

    Gets the developer-specified payload associated with the score, serialized as a JSON string, or null if one was not set.

    Declaration
    public string GetExtraData()
    Returns
    Type Description
    string

    The optional developer-specified payload associated with the score or null if one was not set.

    GetFormattedScore()

    Gets the formatted score associated with the leaderboard entry.

    Declaration
    public string GetFormattedScore()
    Returns
    Type Description
    string

    The formatted score.

    GetPlayer()

    Gets information about the player associated with the entry.

    Declaration
    public LeaderboardPlayer GetPlayer()
    Returns
    Type Description
    LeaderboardPlayer

    The details about the player associated with a score entry.

    GetRank()

    Gets the rank of the player's score in the leaderboard.

    Declaration
    public double GetRank()
    Returns
    Type Description
    double

    The entry's leaderboard ranking.

    GetScore()

    Gets the score associated with the entry.

    Declaration
    public double GetScore()
    Returns
    Type Description
    double

    The integer score value.

    GetTimestamp()

    Gets the timestamp of when the leaderboard entry was last updated.

    Declaration
    public double GetTimestamp()
    Returns
    Type Description
    double

    The Unix timestamp.

    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)