Leaderboard Recommendations?

Hello, I’m currently trying to implement a leaderboard into my 2D platformer game. However, I’m still new to game development and I don’t know how to go about this exactly. I tried using LootLocker’s API but it hasn’t been working when I try to build my game. Does anyone know of a way I can implement a leaderboard into my game that I can use live with other people or a tutorial that I may be able to follow that’s worked for you previously? Thank you in advance.

@Allurance Hey if u didn’t watched this… Here it is a perfect tutorial : 🎮 Online Leaderboards in 5 simple steps - Learn with LootLocker - YouTube

If you want to make it live just switch from stage to live in LootLocker dashboard and make a leaderboard for live and copy the leaderboard id from the Live to ur game script.

Here is an example :
LeaderBoard script :

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using LootLocker.Requests;
using TMPro;

public class Leaderboard : MonoBehaviour
{
    int leaderboardID = (your Live Id here, eg '2992') ;
    public TextMeshProUGUI playerNames;
    public TextMeshProUGUI playerScores;

    public void SubmitScoreRoutine(int scoreToUpload)
    {
        bool done = false;
        string playerID = PlayerPrefs.GetString("PlayerID");
        LootLockerSDKManager.SubmitScore(playerID, scoreToUpload, leaderboardID, (response) =>
         {
             if(response.success)
             {
                 Debug.Log("Successfully uploaded score");
                 done = true;
             }
             else
             {
                 Debug.Log("Failed" + response.Error);
                 done = true;
             }
         });
        done = false;
    }

    public IEnumerator FetchTopHighscoresRoutine()
    {
        bool done = false;
        LootLockerSDKManager.GetScoreListMain(leaderboardID, 10, 0, (response) =>
        {
            if(response.success)
            {
                string tempPlayerNames = "Names

";
string tempPlayerScores = "Scores
";

                LootLockerLeaderboardMember[] members = response.items;

                for (int i = 0; i < members.Length; i++)
                {
                    tempPlayerNames += members*.rank + ". ";*

if(members*.player.name != “”)*
{
tempPlayerNames += members*.player.name;*
}
else
{
tempPlayerNames += members*.player.id;*
}
tempPlayerScores += members*.score + "
";*

tempPlayerNames += "
";

}
done = true;
playerNames.text = tempPlayerNames;
playerScores.text = tempPlayerScores;
}
else
{
Debug.Log(“Failed” + response.Error);
done = true;
}
});
yield return new WaitWhile(() => done == false);
}
}
PlayerManager :
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using LootLocker.Requests;
using TMPro;

public class PlayerManager : MonoBehaviour
{
public Leaderboard leaderboard;
public TMP_InputField playerNameInputfield;

// Start is called before the first frame update
void Start()
{
StartCoroutine(SetupRoutine());
}

public void SetPlayerName()
{
LootLockerSDKManager.SetPlayerName(playerNameInputfield.text, (response) =>
{
if(response.success)
{
Debug.Log(“Succesfully set player name”);
}
else
{
Debug.Log(“Could not set player name”+response.Error);
}
});
}

IEnumerator SetupRoutine()
{
yield return LoginRoutine();
yield return leaderboard.FetchTopHighscoresRoutine();
}

IEnumerator LoginRoutine()
{
bool done = false;
LootLockerSDKManager.StartGuestSession((response) =>
{
if(response.success)
{
Debug.Log(“Player was logged in”);
PlayerPrefs.SetString(“PlayerID”, response.player_id.ToString());
done = true;
}
else
{
Debug.Log(“Could not start session”);
done = true;
}
});
yield return new WaitWhile(() => done == false);
}
}
And yes a final step, in Project Settings > LootLocker SDK turn off the development mode.
Enjoy!