SC_ScoreFormatter

The SC_ScoreFormatter class allows you to configure how the score object should be displayed.

Basic use:

  1. Create an SLScoreFormatter.strings file. A Score formatter for your game is available in the Score Definition section of your game page at https://developer.scoreloop.com. You can copy this and save it in a file named SLScoreFormatter.strings. You can configure the Score Formatter at https://developer.scoreloop.com to meet your specific score formatting needs.

You can also view how the formatted scores will look by clicking on the Get Leaderboard Widget link below the Score Formatter. It is important that the SLScoreFormatter.strings file contains the modified configuration.

  1. Add SLScoreFormatter.strings to your assets. Add SLScoreFormatter.strings to the native/scoreloop directory of your game project, where native is the root of your standard assets folder. You must create the scoreloop subdirectory.

  2. Use the client instance to get the score formatter by calling SC_Client_GetScoreFormatter() .

  3. For each score in the score list returned, call SC_ScoreFormatter_FormatScore() . Remember to release the string used.

Repeat the last two steps in the load Leaderboard Completion Callback, or where you want to display scores, for example, during score submission.

Please take a look at Leaderboards for sample code for integrating the score formatter.