Retrieve Assets In-Game
In this How-to we will demonstrate how to fetch an Asset from the backend to be displayed in your game.
Prerequisites
A LootLocker account
A created game in the web console
An active Asset
Retrieve Asset
To start retrieving assets you can run following:
int count = 10;
LootLockerSDKManager.GetAssetListWithCount(count, (response) =>
{
if (response.success)
{
Debug.Log("Successfully retrieved " + response.assets.Length + " assets");
}
else
{
Debug.Log("Error retrieving assets");
}
});After the initial method has completed retrieving assets you can call this method to get more:
If you want to retrieve all you assets you can keep calling the method until you stop receiving assets.
After finishing retrieving the assets you need, it's best practice to run the following code, as if you try to get assets later, you might start from your previous last retrieved asset.
This is only relevant for Unity! This is not the case for Unreal.
Retrieve Assets With Filter
To use Filters, simply specify the filter you want to retrieve assets with, through the same blueprint as before.
Retrieve Assets by IDs
If you already know the IDs of the assets you wish to get, you can use this method to retrieve them specifically.
Retrieve Favourite Assets
Add Favorite Asset
Remove Favourite Asset
Working With Assets For Player in Game
Get All Key Value Pairs to an Instance
Get A Key Value Pair By Id
Create A Key Value Pair
Update One Or More Key Value Pairs
Delete Key Value Pair
Last updated










