Retrieve Assets In-Game
Last updated
Last updated
In this How-to we will demonstrate how to fetch an Asset from the backend to be displayed in your game.
A LootLocker account
A created game in the web console
An active Asset
To start retrieving assets you can run following:
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.
If you already know the IDs of the assets you wish to get, you can use this method to retrieve them specifically.