Names
When possible, LootLocker will attach a name to the player when starting a session. This however, is only possible for platforms where the player has a name already, such as Steam or PlayStation Network.

Platforms Supporting Automatic Names

Platforms where the name is automatically retrieved when starting a session:
  • Steam
  • PlayStation Network
If you're using a platform without automatic player names, or want to update the name LootLocker has stored for the player, it's possible to change the name using the SDK or API.
Player names can also be viewed in the web console:
Players with names in the web console

Update Player Name in Game

Unity
LootLockerSDKManager.SetPlayerName("Some other name", (response) =>
{
if (response.success)
{
Debug.Log("Successfully set player name");
} else
{
Debug.Log("Error setting player name");
}
});

Retrieve Player Name in Game

Unity
LootLockerSDKManager.GetPlayerName((response) =>
{
if (response.success)
{
Debug.Log("Successfully retrieved player name: " + response.name);
} else
{
Debug.Log("Error getting player name");
}
});

Lookup Multiple Player Names using Player IDs

Unity
ulong player1ID = 1;
ulong player2ID = 2;
ulong player3ID = 3;
LootLockerSDKManager.LookupPlayerNamesByPlayerIds(new ulong[] { player1ID, player2ID, player3ID }, response =>
{
if (response.success)
{
foreach (var player in response.players)
{
Debug.Log(player.player_id);
Debug.Log(player.player_public_uid);
Debug.Log(player.name);
Debug.Log(player.last_active_platform);
Debug.Log(player.platform_player_id);
}
} else
{
Debug.Log("Error looking up player names");
}
});
Multiple platforms and public UID is also supported:
- LookupPlayerNamesByPlayerPublicUIds(string[] playerPublicUIds, Action onComplete)
- LookupPlayerNamesBySteamIds(ulong[] steamIds, Action onComplete)
- LookupPlayerNamesBySteamIds(string[] steamIds, Action onComplete)
- LookupPlayerNamesByPSNIds(ulong[] psnIds, Action onComplete)
- LookupPlayerNamesByPSNIds(string[] psnIds, Action onComplete)
- LookupPlayerNamesByXboxIds(string[] xboxIds, Action onComplete)
Copy link
On this page
Update Player Name in Game
Retrieve Player Name in Game
Lookup Multiple Player Names using Player IDs