Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
  1. Open the Package Manager window in your Unity project.
  2. Click the plus icon on click "Add package from git URL"
  3. Paste this in the URL field and then press Add:
com.unity.nuget.newtonsoft-json@3.0


Well that did the trick! And now I feel silly for forgetting about adding packages that way...

Hey, me again! I really don't want to bother other devs so I plugged away at this for several days but it I can't seem to get it to upload more than one entry in my leaderboard.

I have a script that only uploads an entry if no similar score exists. Every thing's fine if the leaderboard is empty. However, if there's already an entry, a new entry doesn't seem to get uploaded.

What happens is when I get a new score the script runs UploadNewEntry . I get a "successfully uploaded entry data" message. I then run GetLeaderboard to fetch the new entry. I get a "Successfully retrieved" message but no new entry actually appears.

When I clear the leaderboard and run the script again, the new entry appears but no new ones will.

OK. I think I found the issue. It won't upload a new value if the username is already in the leaderboard. I tested it here and in my script.

(1 edit)

Just to note, the score will only get uploaded and submitted if its higher than the previous one in the leaderboard.

Yeah, I figured that out as well. Is there any way to make it so that it gets uploaded even if it's the same user? There's a certain satisfaction to seeing yourself have all the highest scores :D

I can implement a system where you can toggle whether or not you want to keep the same scores, but that also means that someone could just spam the leaderboard with different scores but with the same name. If you want to go with this route, then I have a solution for you that is not so straight-forward, but it involves the usage of the "Extra" field.

You could save the scores of the user locally, then every time you upload a player's score to the leaderboard, you add their previous scores to the Extra field as a string. Then every time you request the leaderboard's entries to load, you can not only display the highscores of the players, but also their previous attempts. How does that sound?

(1 edit)

That's a nice bit of creative thinking! But I think it's fine for now, I've implemented my own thing for now. I decided to just show the user's rank and score as well as the #1 and the rank lower just so they have a general idea where their best score stands relative to others. 

I'm also using multiple boards (1 per level) which are ranked according to speed. So I'm actually using the Extra field to identify which level it is since, afaik, there's no way to query the leaderboard name or other identifier itself? And since it's ranked by time, the highest score is actually the lowest rank but that's easy enough to address with sorting.

Maybe the biggest thing right now is a way to do something if the server can't be reached or the leaderboard is inaccessible for some reason. I'd like to be able to display a message to the player. Right now I can see the log error  msgs in the console but not a way to do something when they happen.


Thank you, again!

I'd suggest using multiple leaderboards for multiple levels, as each leaderboard can only hold 100 entries for now.

I will probably update the library to include a "Ping" function which will check if the server is up or not, and based on that you could show an error message to the player.

Thank you for using my tool, I look forward to improving  it.

Hello again! Here's the game I used your leaderboard on just in case you're going to have a list of games that use it for promotion or something. I just made it public a few days ago (there's already an error I need to fix but for now it'll have to do).

The game is originally targeted for mobile but I uploaded it to itch for testing and feedback purposes. Now I'm trying to get an android build out as well but it throws a build error that includes this line:

C:\Users\nenet\Documents\Git\Brick-It-Down\Library\Il2cppBuildCache\Android\armeabi-v7a\il2cppOutput/Dan.cpp:10491: error: undefined reference to 'CopyToClipboard'

clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation

So I'm thinking it might have to do with something in Leaderboard Creator? I'm hoping there's something you can do with it otherwise I'm going to have to remove everything related to LC when building to android then putting them back in for my WebGL builds which can get quite tedious specially considering the number of leaderboards I'm using. 

Thank you!

Hello! Looks like one of my utility scripts accidentally slipped into the Unity package, sorry for that. You're gonna want to go to the LeaderboardCreator/Utils path and delete the Clipboard script.
I've updated it now, and alternatively you can delete the LeaderboardCreator folder, download this new version of the package and import it.

Excellent! Thanks!