Search Unity

Google Game Services: How to avoid reporting score of different user in same device

Discussion in 'Scripting' started by pokeking, Mar 13, 2016.

  1. pokeking

    pokeking

    Joined:
    May 13, 2015
    Posts:
    42
    Hi, i'm going to make a leaderboard by this tutorial: http://shaneobrien.ie/official-google-play-game-services-plugin/
    In that tutorial, they reported "5000 point" to leaderboard, but i want to report score in my game, so i created "private int score", set "score = Common.score" (Common script save the common score of my game) in Start, and reporting that score to leaderboard.
    When i played, i got score = 500 for account A, and i log out and sign in with account B. After signing in, i press "Show Leaderboard" button, the score off account B is 0, but when i press "Leaderboard" button (to report score), account B's score = 500. It should be 0, right?
    So how can i avoid that situation? Or i'm still missing someway to check ID of user?
    Please show me how can i fix it.