Stay organized with collections
Save and categorize content based on your preferences.
GooglePlayGames.PlayGamesScore
Represents a score on a Google Play Games leaderboard.
Summary
Implements the Unity IScore
interface.
Inheritance
Inherits from: IScore
Properties
|
date
|
DateTime
Gets the date and time this score was achieved.
|
formattedValue
|
string
Gets the score value as a formatted string.
|
leaderboardID
|
string
Gets or sets the ID of the leaderboard this score is for.
|
metaData
|
string
Gets the metadata associated with this score (also known as a score tag).
|
rank
|
int
Gets the rank of this score in the leaderboard.
|
userID
|
string
Gets the ID of the user who achieved this score.
|
value
|
long
Gets or sets the score value.
|
Public functions
|
ReportScore(Action< bool > callback)
|
void
Reports this score to the Google Play Games services.
|
Properties
date
DateTime date
Gets the date and time this score was achieved.
string formattedValue
Gets the score value as a formatted string.
leaderboardID
string leaderboardID
Gets or sets the ID of the leaderboard this score is for.
string metaData
Gets the metadata associated with this score (also known as a score tag).
rank
int rank
Gets the rank of this score in the leaderboard.
userID
string userID
Gets the ID of the user who achieved this score.
value
long value
Gets or sets the score value.
Public functions
ReportScore
void ReportScore(
Action< bool > callback
)
Reports this score to the Google Play Games services.
This is equivalent to calling PlayGamesPlatform.ReportScore.
Details |
Parameters |
callback
|
A callback to be invoked with a boolean indicating the success of the operation.
|
|
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-07-08 UTC.
[null,null,["Last updated 2025-07-08 UTC."],[],[],null,["# GooglePlayGames.PlayGamesScore Class Reference\n\nGooglePlayGames.PlayGamesScore\n==============================\n\nRepresents a score on a Google Play Games leaderboard.\n\nSummary\n-------\n\nImplements the Unity `IScore` interface.\n\n### Inheritance\n\nInherits from: IScore\n\n| ### Properties ||\n|----------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------|\n| [date](#class_google_play_games_1_1_play_games_score_1af911623bfd163f919819beac7610e01a) | `DateTime` Gets the date and time this score was achieved. |\n| [formattedValue](#class_google_play_games_1_1_play_games_score_1a5d1e7e39d12533da12621368180be33e) | `string` Gets the score value as a formatted string. |\n| [leaderboardID](#class_google_play_games_1_1_play_games_score_1aed8e96577d94e857540c0d4eda4c089f) | `string` Gets or sets the ID of the leaderboard this score is for. |\n| [metaData](#class_google_play_games_1_1_play_games_score_1a100ef41cbb61d778dcdb67539d5e0424) | `string` Gets the metadata associated with this score (also known as a score tag). |\n| [rank](#class_google_play_games_1_1_play_games_score_1a286fc07d22d2abda846421d17597825a) | `int` Gets the rank of this score in the leaderboard. |\n| [userID](#class_google_play_games_1_1_play_games_score_1ac40ac391c61e9f41e7a20557c3c9963f) | `string` Gets the ID of the user who achieved this score. |\n| [value](#class_google_play_games_1_1_play_games_score_1a1044600e530e02458627df717528c107) | `long` Gets or sets the score value. |\n\n| ### Public functions ||\n|----------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------|\n| [ReportScore](#class_google_play_games_1_1_play_games_score_1a2848d7c555e8e78bcf7de42b2b255560)`(Action\u003c bool \u003e callback)` | `void` Reports this score to the Google Play Games services. |\n\nProperties\n----------\n\n### date\n\n```c#\nDateTime date\n``` \nGets the date and time this score was achieved. \n\n### formattedValue\n\n```c#\nstring formattedValue\n``` \nGets the score value as a formatted string. \n\n### leaderboardID\n\n```c#\nstring leaderboardID\n``` \nGets or sets the ID of the leaderboard this score is for. \n\n### metaData\n\n```c#\nstring metaData\n``` \nGets the metadata associated with this score (also known as a score tag). \n\n### rank\n\n```c#\nint rank\n``` \nGets the rank of this score in the leaderboard. \n\n### userID\n\n```c#\nstring userID\n``` \nGets the ID of the user who achieved this score. \n\n### value\n\n```c#\nlong value\n``` \nGets or sets the score value.\n\nPublic functions\n----------------\n\n### ReportScore\n\n```c#\nvoid ReportScore(\n Action\u003c bool \u003e callback\n)\n``` \nReports this score to the Google Play Games services.\n\nThis is equivalent to calling [PlayGamesPlatform.ReportScore](/games/services/unity/v2/api/class/google-play-games/play-games-platform#class_google_play_games_1_1_play_games_platform_1a9a51e50e3de344ec7c896d89ca600b1d).\n\n\u003cbr /\u003e\n\n| Details ||\n|------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Parameters | |------------|----------------------------------------------------------------------------------| | `callback` | A callback to be invoked with a boolean indicating the success of the operation. | |"]]