Use Metadata to Store Additional Information

In this scenario, the player has had the opportunity to write / select their country to be displayed on the Leaderboard.

string leaderboardKey = "my_leaderboard";
int score = 1000;
string metadata = "country:" + PlayerPrefs.GetString("PlayerAssignedCountry");

LootLockerSDKManager.SubmitScore("", score, leaderboardKey, metadata, (response) =>
    if (!response.success) {
        Debug.Log("Could not submit score!");
     Debug.Log("Successfully submitted score!\n with metadata: " + metadata);

Last updated