Skip to content

A free scalable local leaderboard system for Unity with the option to save a score as a number or time.

License

Notifications You must be signed in to change notification settings

CarterGames/LeaderboardManager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LBM

Leaderboard Manager is a FREE local leaderboard system for Unity games.

Badges

CodeFactor GitHub all releases GitHub release (latest by date) GitHub repo size

Key Features

  • Easily create & update leaderboards with a name & score.
  • Support for multiple leaderboards.
  • Support for TextMeshProGUI.
  • Support for showing score as time.

How To Install

Either download and import the package from the releases section or the Unity Asset Store and use the package manager. Alternatively, download this repo and copy all files into your project.

Setup

The asset doesn’t need any setup by you to function. By default there are no leaderboards in the save data. The save will automatically create itself when you first create a leaderboard with the system. The leaderboard save goes to the users computer persistent datapath.

2.0.x save updating

You can port legacy data in editor and setup the porting. In older versions users could save time as a number, this has been updated into a custom class. If used it'll need to ported to a time entry board. The controls to this and the ability to view your current boards can be found under Tools/Carter Games/Leaderboard Manager/Leaderboard Editor An example setup to port a leaderboard called "Arcade" to a score leaderboard.

lbm-legacyport-runtime-01

Basic API Usage

Create a leaderboard called "MyBoard"

LeaderboardManager.CreateLeaderboard("MyBoard", LeaderboardType.Score);

Get leaderboard data for the board called "MyBoard"

var data = LeaderboardManager.GetLeaderboard("MyBoard");

Add entry to board called "MyBoard" for a player called "John" with a score of 100

LeaderboardManager.AddEntryToBoard("MyBoard", new LeaderboardEntryScore("John", 100));

Remove entry from board called "MyBoard" for a player called "John" of a score of 100

LeaderboardManager.DeleteEntryFromBoard("MyBoard", new LeaderboardEntryScore("John", 100));

Save all leaderboards

LeaderboardManager.Save();

Load all leaderboards

LeaderboardManager.Load();

Documentation

You can access a online of the documentation here: Online Documentation. A offline copy if provided with the package and asset if needed.

Authors

Licence

MIT Licence