Unity

Unity integration

The LeaderboardModule is responsible for managing player scores and ranking players according to their scores. This module provides various functionalities such as setting player score, getting leaderboard data, fetching player entries on the leaderboard and more.

LeaderboardData
  • id (string): Unique id of the leaderboard.

  • name (string): Leaderboard name. Is used also to store the localization key for the name.

  • description (string): Leaderboard description. Is used also to store the localization key for the description.

  • invertSortOrder (bool): Sorting direction. False implies that places are sorted in descending order, while true means places are sorted in ascending order.

  • decimalOffset (int): This parameter determines how many digits of the score integer are displayed after the decimal point. The size of the decimal part. For example, with decimalOffset: 2, the number 1234 will be displayed as 12.34.

  • type (string): The leaderboard type that determines the results unit. Possible values: numeric — Number, time — Time in milliseconds.

  • autoResettable (bool): Determines whether the leaderboard should automatically reset.

  • resetEveryTimeAtCron (string): A Cron expression to specify the reset period.

  • rewardsAtReset (LeaderboardReward[]): Rewards which will be earned at the reset period.

  • requiredToJoin (JoinRequirement[]): A list of requirements that must be met when a user joins a leaderboard. Joining here means adding and setting user scores. Currently, three types are supported. Please see the JoinRequirement description for more information.

  • createdAt (long): Date and time when the leaderboard was created. This field is automatically populated by the backend.

  • updatedAt (long): Date and time when the leaderboard was last time updated. This field is automatically populated by the backend.

  • createdBy (string): User Id who created the leaderboard. This field is automatically populated by the backend.

  • updatedBy (string): User Id who last time updated the leaderboard. This field is automatically populated by the backend.