Leaderboards stopped working properly in already released stand-alone game. Still work ok when running in Unity Editor
See original GitHub issueI’ve published a game back in january with facepunch.steamworks integration. Everything was working ok, with leaderboards integration, uploading scores, etc.
Suddenly leaderboards don’t work. If i’m running the same version of the game in Unity’s Editor everything is fine, but the already published game doesn’t connect to them.
I have not updated the release since january so I’m pretty sure it’s nothing on my side since it was already working. Maybe something is different in leaderboards and facepunch isn’t supporting it yet?
I’ve uploaded a debug version of my game and when I check my leaderboard and “leaderboard.isError” returns true every time. I’m checking the leaderboard with
leaderboard= Client.Instance.GetLeaderboard("NormalRanking", Client.LeaderboardSortMethod.Descending, Client.LeaderboardDisplayType.Numeric);
All other functionality such as getting usernames and avatar works without problems.
Really worried about this :S
Issue Analytics
- State:
- Created 5 years ago
- Comments:21
Top GitHub Comments
Since the last time I posted, I completely re-implemented the Steam support in my game using Steamworks.NET instead. It took many hours to do this, but the advertised features in my game now once again work perfectly. I assumed that doing this would cause Facepunch to fix their library’s errors, in the same way that buying a new umbrella is the fastest way to find the one you misplaced. But I now see that unfortunately, nothing has changed. So, for the benefit of others trapped in this situation, I documented my code and am offering it here: http://hiaaron.com/?q=code Hopefully this is a help to someone.
Sorry for the late reply, have not had much time to devote to projects lately. The way my game does it, after setting up the Steam client as steamClient, is:
(I believe this is Using System.Threading)
Finally, SubmitTimeToLeaderboards sets a bool to True, letting the game know that a query is in progress. That completes its work.
On the next frame, the game sees that a query is still in progress, then calls a second method called SubmitTimeToLeaderboardsContinue. The first thing it does is:
if ((lb.IsValid) || (lb.IsError))
If this returns false, nothing else happens until the next frame. If it returns true, lb.AddScore is called.Currently, in 32-bit builds, this worked for me on release, then didn’t work, then worked once again after I added step 3 above. Hopefully this helps?
I will say this: after 3 months with no replies from Facepunch, I now plan to re-implement my game’s Steam support using Steamworks.NET instead, when I find the time to do it. I’ve already sunk many hours into this issue that I’d really wanted to use for further game development. It’s a shame, because Facepunch.Steamworks seemed really easy to use at first, but if we keep seeing issues like this, and it’s not going to be supported, then it’s going to cost me more time in the long run than it saves =(