Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Google Play Services Highscore Problem

Discussion in 'Android' started by cenker, Sep 11, 2016.

  1. cenker

    cenker

    Joined:
    Oct 26, 2012
    Posts:
    45
    1. string score = "";
    2. PlayGamesPlatform.Instance.LoadScores(
    3. <your_leaderboard_ID_here>,
    4. LeaderboardStart.PlayerCentered,
    5. 1,
    6. LeaderboardCollection.Public,
    7. LeaderboardTimeSpan.AllTime,
    8. (LeaderboardScoreData data)=>{

    9. score = data.PlayerScore.formattedValue;
    10. });
    11. return score;

    I'm trying to get highscore from google play for show it in game but it always give null or 0 . I testing in mobile and sure I connected to net .Didnt google implement leaderboard callback yet?
     
  2. cenker

    cenker

    Joined:
    Oct 26, 2012
    Posts:
    45
    I think there is no way to get player's highscore and must store score in playerprefs. But after reinstall device data and google play will not match
     
  3. cenker

    cenker

    Joined:
    Oct 26, 2012
    Posts:
    45
    Anybody know way to do it?