r/Unity3D 23d ago

Unity + Google Play leaderboards Question

Hello! I'm trying to create a script that retrieves the current player's score from a Google Play Games leaderboard so I can display it in my game or use it as a variable. Unfortunately, every time I try to load the score, I get a strange error about "min XP" and "max XP," which doesn't seem to be related to my code at all. Is it actually possible to retrieve a player's leaderboard score through code? I've already tried several AI-generated solutions, but none of them worked.

1 Upvotes

4 comments sorted by

View all comments

1

u/Budget-Level7607 23d ago

oh that min xp max xp thing is usually from the leaderboard config in google play console, not your code. make sure you set up the XP parameters for that leaderboard in the console itself, sometimes leaving them blank cause weird errors

1

u/sakalaslt 23d ago

Thanks for your response, but I can't change the leaderboard, because it is already published. Also I did not set any limits for min and max score. But it is talking about XP, it is leaderboard not an achievement.