Skip to content

Storage

To view Player storage in the web console, go to the player and select the storage tab. From here it's possible to view and edit the data for the player.

Storage tab on a Player's page in the Web Console
LootLockerSDKManager.GetEntirePersistentStorage((response) =>
{
if (response.success)
{
Debug.Log("Successfully retrieved player storage: " + response.payload.Length);
} else
{
Debug.Log("Error getting player storage");
}
});
string key = "some-key";
LootLockerSDKManager.GetSingleKeyPersistentStorage(key, (response) =>
{
if (response.success)
{
if (response.payload != null)
{
Debug.Log("Successfully retrieved player storage with value: " + response.payload.value);
} else
{
Debug.Log("Item with key " + key + " does not exist");
}
} else
{
Debug.Log("Error getting player storage");
}
});

To update a single value for a key

LootLockerSDKManager.UpdateOrCreateKeyValue("some-key", "some new value", (getPersistentStoragResponse) =>
{
if (getPersistentStoragResponse.success)
{
Debug.Log("Successfully updated player storage");
}
else
{
Debug.Log("Error updating player storage");
}
});

To update or create multiple keys at the same time

LootLockerGetPersistentStorageRequest data = new LootLockerGetPersistentStorageRequest();
data.AddToPayload(new LootLockerPayload { key = "some-key", value = "Some new value" });
data.AddToPayload(new LootLockerPayload { key = "some-other-key", value = "Some other new value" });
LootLockerSDKManager.UpdateOrCreateKeyValue(data, (getPersistentStoragResponse) =>
{
if (getPersistentStoragResponse.success)
{
Debug.Log("Successfully updated player storage");
}
else
{
Debug.Log("Error updating player storage");
}
});
LootLockerSDKManager.DeleteKeyValue("some-key", (getPersistentStoragResponse) =>
{
if (getPersistentStoragResponse.success)
{
Debug.Log("Successfully removed key from player storage");
}
else
{
Debug.Log("Error removing key from player storage");
}
});

For this you need the public UID of the other player.

LootLockerSDKManager.GetOtherPlayersPublicKeyValuePairs("92AR9254", (response) =>
{
if (response.success)
{
Debug.Log("Successfully retrieved storage for other player " + response.payload.Length);
}
else
{
Debug.Log("Error retrieving storage for other player");
}
});