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. Dismiss Notice

Resolved Add Friends By Name?

Discussion in 'Friends' started by MiTschMR, Apr 21, 2023.

  1. MiTschMR

    MiTschMR

    Joined:
    Aug 28, 2018
    Posts:
    347
    Currently, the only way of adding a friend is by adding it via the ID. But this ID can only be retrieved if the player sends it to the other person in some way, like discord.

    Will there be the possibility of adding friends by using the name#number format?
     
  2. AlfredoMurillo

    AlfredoMurillo

    Unity Technologies

    Joined:
    Apr 21, 2023
    Posts:
    2
    Hi MiTscMR, I believe the ability to add a friend using their name#number was added to the 0.2.0-preview.9 build, it was just not documented. The docs got updated recently, I hope this helps :)

    In case you are curious you also have the ability to have each user set their own name and not have the autogenerated one. More information here
     
  3. MiTschMR

    MiTschMR

    Joined:
    Aug 28, 2018
    Posts:
    347
    Thanks a lot for this information, great to hear that was implemented!

    About the the names, I am confused as to what is included in the profile data. If the player doesn't have a player name set, it uses the auto generated one for the friends system and if he does have one, it uses that or what? Because from my understanding, you can't get the player name from someone else within the authentication service.
     
  4. AlfredoMurillo

    AlfredoMurillo

    Unity Technologies

    Joined:
    Apr 21, 2023
    Posts:
    2
    Glad I could help,

    The profile name works this way:

    If the player does not have a player name set, then the friends system will contact the authentication service to get an auto-generated name for said player.

    If the player already set a name using the authentication service then the friends system will use the name that was set using the authentication service.

    Ultimately the player name will always reside within the authentication service. Friends just requests to have one autogenerated if one was not set prior, until the player decides to change it.
     
    MiTschMR likes this.