Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Question Updated Time not yet available?

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

  1. MiTschMR

    MiTschMR

    Joined:
    Aug 28, 2018
    Posts:
    529
    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:
    35
    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:
    529
    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:
    35
    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:
    529
    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.