UGTK / Toolkit / API / Leaderboard Api System Completed
Leaderboard System
Summary
The Leaderboard System displays a list of users and their scores, sorted in order.
Content
Modules Dependencies
The TextUpdaterSystem module requires the following dependencies:
- TextMeshPro: Unity package for advanced text rendering.
- GameObjectExtension: Extension class for GameObject providing additional functionality.
- LayoutAutoResize: Layout auto resize hold UI and change size for incoming UI.
- PoolingSystem: The Pooling System efficiently manages and reuses GameObject instances.
Ensure that these dependencies are correctly imported and configured in your project.
Setup
To set up the Leaderboard System, follow these steps:
- Add the
Leaderboardprefab to your scene:
How To Use
To use the Leaderboard System, utilize the following methods, called by code:
- Add user(s) to the leaderboard:
leaderboard.AddUsers(listOfUsers);
leaderboard.AddUser(users);
leaderboard.AddUser(nickname, score);
leaderboard.AddItem(userGameobject, entryIndex);
- Obtain back the list of users:
List<Mn_LeaderboardUser> users = leaderboard.GetUsers();
- Update the score of a user:
leaderboard.UpdateScore(nickname, score);
Testing Scene
The board also fills itself from the live server: Mn_LeaderboardDownloader.DownloadUsers() fetches the stored rows from the PHP backend and populates the list at runtime.
Technical Info
The following are the main scripts and workflow of the Leaderboard System:
Scripts:
- Mn_Leaderboard: Core script that handles each user entry of the Leaderboard.
- Mn_LeaderboardUser: Hold user info to be displayed on the leaderboard.
- S_LeaderboardUserInfo: Info about username and score of the user.
© 2026 Marcello De Bonis. All rights reserved
Depends on 8
Used by 0
- No other module depends on it.
Measured from the repository: code references (asmdef) plus prefab and asset GUIDs. Importing this module alone brings in 17 modules in total.
UGTKengine within an engine


