SCILLLeaderboardManager

public class SCILLLeaderboardManager : MonoBehaviour

Overview

This is a utility script for subscribing to realtime updates when a specific leaderboard was first loaded from the SCILL backend and for subscribing to realtime changes to the leaderboard.

When being enabled, this script will request a full leaderboard reload and call the OnLeaderboardRankingLoaded unity event on response. Changes to the leaderboard will be broadcasted to the OnLeaderboardRankingChanged unity event. Use this script if you’d like to have access to those events over the inspector or via code.

Please note that SCILLLeaderboardManager is designed to work with leaderboards of type user only, not for type teams.

Inspector Properties

leaderboardId

public string leaderboardId;

You need to set a Leaderboard ID. You find the leaderboard ID in the Admin Panel in the Leaderboard list. You can also change this value via script and implement tabs or a leaderboard selection that allows users to display different leaderboards.

Every list in the Admin Panel has this button to copy IDs

Every list in the Admin Panel has this button to copy IDs

Info

You can change the leaderboard id via script everytime, but make sure you call the UpdateLeaderboard method so the data is updated.

Events

OnLeaderboardRankingLoaded

[SerializeField] public LeaderboardRankingLoaded OnLeaderboardRankingLoaded;

Called when receiving a full reload of the Leaderboard with the supplied leaderboardId.

OnLeaderboardRankingChanged

[SerializeField] public LeaderboardRankingChanged OnLeaderboardRankingChanged;

Called when receiving a realtime update of the Leaderboard with the supplied leaderboardId.