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

Social Leaderboard: How to display user names?

Discussion in 'Scripting' started by mikatu, Nov 26, 2015.

  1. mikatu

    mikatu

    Joined:
    Aug 3, 2015
    Posts:
    28
    Hi,

    Maybe I am missing something but how do you get user names when using Unity's Social Leaderboard API? There is an example in the documentation that uses userID, but that is just an id string and I need to get "displayName" or "alias" on iOS.
    http://docs.unity3d.com/ScriptReference/Social.LoadScores.html
     
  2. mikatu

    mikatu

    Joined:
    Aug 3, 2015
    Posts:
    28
    OK, found it.
    "You can load the users information using Social.LoadUsers."
    Seems more complex that it really needs to be with all the callbacks, compared to how it works on native iOS. Plus, I assume it automatically loads all profile images too which I really don't need...
     
  3. coder_for_life22

    coder_for_life22

    Joined:
    Dec 25, 2013
    Posts:
    46
    Would you mind sharing code on how you did this?
     
  4. djhatvr

    djhatvr

    Joined:
    Sep 22, 2019
    Posts:
    41
    If you were to share your code you may help others out as well...