Search Unity

Question Updated Time not yet available?

Discussion in 'Leaderboards' started by MiTschMR, Apr 20, 2023.

  1. MiTschMR

    MiTschMR

    Joined:
    Aug 28, 2018
    Posts:
    487
    When getting leaderboard entries, I see that the update time is always xyz, as seen on the following screenshot:
    upload_2023-4-20_21-21-46.png
    When does this value get updated? When an existing score is updated? It may make sense to store the creation date there if it was just created.
     
  2. devingunity

    devingunity

    Unity Technologies

    Joined:
    May 26, 2021
    Posts:
    33
    Hi MiTschMR, currently the UpdatedTime property is only returned for methods that return a single score (i.e. AddPlayerScoreAsync and GetPlayerScoreAsync), and not for methods which return multiple scores, which is why you're getting the default value. We need to make this clearer in the documentation!
     
  3. MiTschMR

    MiTschMR

    Joined:
    Aug 28, 2018
    Posts:
    487
    Are there plans to return it when getting multiple scores? It doesn‘t make any sense to get the score for a selected user only because of the update time. This would require dozens of requests if a player decided to go through the whole list.
     
  4. devingunity

    devingunity

    Unity Technologies

    Joined:
    May 26, 2021
    Posts:
    33
    Hi MiTschMR, we don't have any plans to return it more broadly at the moment - the field is primarily meant to allow you to handle offline behavior if you wish (e.g. collecting scores on the device and submitting only the scores since the last update), rather than for broader display purposes. That being said if you have other use cases we can definitely take them into consideration!
     
  5. MiTschMR

    MiTschMR

    Joined:
    Aug 28, 2018
    Posts:
    487
    I am thinking about using it in a monthly (or even longer period of time) chart to show the user when a highscore was reached. Just imagine having time trial based competitions e.g. in F1 22, or trying to get the highest score in a certain mission in a certain character over a bigger period of time. If the game wants to display the user a collected report over this period of time, it is not possible to say when the score was submitted.