6
\$\begingroup\$

When using the Steamworks SDK (in C++), is there any way to get the display/persona name from the CSteamID object, even if we are not friends on Steam? Or is this possible for friends only?

In that case, when using a Steam leaderboard, how else should I display the nick names of the leaderboard entries in my game?

\$\endgroup\$
2
  • \$\begingroup\$ Have you figured it out? \$\endgroup\$ Nov 14, 2016 at 19:28
  • \$\begingroup\$ @MilanBabuškov As it turned out I already get all display names, no need to explicitly request for them. \$\endgroup\$
    – Matthias
    Nov 16, 2016 at 13:42

1 Answer 1

2
\$\begingroup\$

You can use

SteamFriends.GetFriendPersonaName(steamUserID);

To get the user name even if they are not in your friends list. I have tested this out using Steamworks.NET in Unity.

\$\endgroup\$
2
  • 3
    \$\begingroup\$ I did that and get Unknown \$\endgroup\$ Feb 28, 2020 at 16:35
  • 2
    \$\begingroup\$ I did that too, and got "[unknown]" string as a result, too. Did that for a friend just to verify if the function works at all, and it did return the correct name for the friend. \$\endgroup\$
    – KulaGGin
    Mar 10, 2023 at 18:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .