Your next feature
Leaderboard
Save the score after each round and show who's ahead.
Unity

Your visible result
Your test score appears in the leaderboard after a round.
View leaderboard standings0:59
Existing dashboard tutorial. It shows the previous design; the guide follows the current workflow.
Open video separately ↗Build this feature
You can preview the guide. Running it requires an active project key. Prepare project
SDK installed, project configuration imported and player signed in.
C#
1using UnityEngine;
2using PM.horizOn.Cloud.Core;
3using PM.horizOn.Cloud.Manager;
4
5// Attach this script to a GameObject in your first scene.
6public class LeaderboardDemo : MonoBehaviour
7{
8 async void Start()
9 {
10 // Setup: initialize, connect and sign in a player.
11 HorizonApp.Initialize();
12 await new HorizonServer().Connect();
13 await UserManager.Instance.SignUpAnonymous("PlayerName");
14
15 // horizOn: submit a score, read the top list and the own rank.
16 // Submit score (only updates if higher)
17 await LeaderboardManager.Instance.SubmitScore(12500);
18
19 // Get top players
20 var top = await LeaderboardManager.Instance.GetTop(10);
21
22 // Get your rank
23 var rank = await LeaderboardManager.Instance.GetRank();
24 }
25}
Test your new feature.
Your test score appears in the leaderboard after a round.
Choose the same project in the dashboard as in your game configuration.

