Skip to content
On this page

ScoresCurrentUser (Class)

Manages retrieving and recording scores for the currently logged-in user.

Methods

RecordScore

Records the user's score for a particular game level.

ParameterDescription
string levelKeyKey associated with the level for which the score is being recorded.
float scoreThe score value (in milliseconds) to be recorded.
System.Action onSuccessCallback to execute upon successful recording of the score.
System.Action<string> onErrorCallback to execute in case of an error.

GetDailyBest (Overloaded)

Retrieves the user's daily best score for a particular game level.

ParameterDescription
string levelKeyKey associated with the level.
System.Action<DailyBest> onSuccessCallback to execute upon successful retrieval of daily best score.
System.Action<string> onErrorCallback to execute in case of an error.
ParameterDescription
string levelKeyKey associated with the level.
string valueFormatterFormatter for the score value.
System.Action<DailyBest> onSuccessCallback to execute upon successful retrieval of daily best score.
System.Action<string> onErrorCallback to execute in case of an error.

GetScores (Overloaded)

Retrieves the user's scores for the specified level and period.

ParameterDescription
string levelKeyKey associated with the level.
ScorePeriod periodTime period for which the scores are to be retrieved.
System.Action<List<Score>> onSuccessCallback to execute upon successful retrieval of scores.
System.Action<string> onErrorCallback to execute in case of an error.
ParameterDescription
string levelKeyKey associated with the level.
ScorePeriod periodTime period for which the scores are to be retrieved.
string valueFormatterFormatter for the score value.
System.Action<List<Score>> onSuccessCallback to execute upon successful retrieval of scores.
System.Action<string> onErrorCallback to execute in case of an error.