Creating a leaderboard linked to a statistic
The first step is to create a leaderboard definition that can take as input the information tracked by the Statistics service. The following example shows how to create the leaderboard definition using the C# SDK.LeaderboardColumn object, with a property called LinkedStatisticColumn, which allow us to create a link between
the stats and the leaderboard. We need to specify the statistic name and the column name within that statistic to make the mapping.
By doing this, we track the player’s progress with the Statistics service. Then the Leaderboard service uses
this information and populates the linked leaderboard.
Unlink statistic from leaderboard
The service also has a mechanism to unlink the statistics from the leaderboard if needed. There could be multiple reasons why a developer might want to perform this action, such as testing different configurations or mapping different statistics. The following example shows how to unlink the statistics from the leaderboard using the C# SDK.- Leaderboards can’t be updated directly, it should always go through the stat update to make use of the automatic mechanism.
- Leaderboards can’t increment their version independently from the statistic.
- Leaderboards can’t be deleted unless we go through the unlinking process.
