Names

Player profiles can be assigned names by the players themselves or the platform they are playing on.

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:

Unique Player Names

If you want to ensure that no two players in your game has the same name, you can use the Unique Player Names setting in your games settings.

Enabling this toggle, will return an error when updating a players name, if that name is already taken.

Update Player Name in Game

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

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

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)

Last updated