Steamworks.NET leaderboard implementation.

Hello,

I’m looking for some help in implementing a steam leaderboard system. Google does not seem to give result on how to integrate leaderboard step by step. I did see a tutorial on implementing stats, getting the username and the profile picture of the user. This means, the basic steps are done, installing Steamworks.NET package, changing app id-s where necessary.

I’ve tried loading the leaderboard and updating it but without result. I will continue to test and experiment until I get it working but for the sake of development time, it would be nice if there was tutorial on initializing the leaderboard, loading it through code, getting info from that leaderboard and updating the leaderboard.

If I ever get this done I might make a video about the process.

Cheers,
Frosty!

I found this: c# - How to do leaderboards in Steamworks.NET? - Stack Overflow

Might prove to be useful.

2 Likes

@F-R-O-S-T-Y Did you get to implement the leaderboards?
I am not able to find enough documentation on this. Please guide me if you found anything on this.
For one I’m not able to find how to get Display name of a player(other than in friends list) to be put up on Leaderboard.

Thank you!

https://partner.steamgames.com/doc/features/leaderboards
Should be all you need? Tells you exactly what methods to use to update score etc.

And for a exact how to:

1 Like

Hi,

Yes I have referred to them but it was bit confusing. But anyhow I figured it out.

For someone who might find this useful:
After fetching leaderboard entries, we can find the Steam Player name of an entry by using

string playerName = SteamFriends.GetFriendPersonaName(lbEntry.m_steamIDUser); // lbEntry is of type LeaderboardEntry_t referring test script

It works even if the user is not in your friends list.

2 Likes

Hey, yes I was able to get the to work. But I can see you already figured it out.

Hi all, just wanted to say that I have released a Leaderboards package for Steam on the Unity Asset Store:
https://www.assetstore.unity3d.com/en/#!/content/93354