Comment on page
Economy In-game Implementation
Unity
Unreal
string holderUlid; //holderUlid can be found in the start Session calls as response.player_ulid
LootLocker.LootLockerEnums.LootLockerWalletHolderTypes player = LootLocker.LootLockerEnums.LootLockerWalletHolderTypes.player;
LootLockerSDKManager.GetWalletByHolderId(holderUlid, player, (response) =>
{
if(!response.success)
{
//If wallet is not found, it will automatically create one on the holder.
Debug.Log("error: " + response.errorData.message);
Debug.Log("request ID: " + response.errorData.request_id);
return;
}
});
Unity
Unreal
string holderUlid; //holderUlid can be found in the start Session calls as response.player_ulid
LootLocker.LootLockerEnums.LootLockerWalletHolderTypes character = LootLocker.LootLockerEnums.LootLockerWalletHolderTypes.character;
LootLockerSDKManager.GetWalletByHolderId(holderUlid, character, (response) =>
{
if(!response.success)
{
//If wallet is not found, it will automatically create one on the holder.
Debug.Log("error: " + response.errorData.message);
Debug.Log("request ID: " + response.errorData.request_id);
return;
}
});
Unity
Unreal
string WalletID = "";
LootLockerSDKManager.GetWalletByWalletId(walletID, (response) =>
{
if(!response.success)
{
Debug.Log("error: " + response.errorData.message);
Debug.Log("request ID: " + response.errorData.request_id);
return;
}
});
Unity
Unreal
LootLockerSDKManager.ListCurrencies((response) =>
{
if (!response.success)
{
Debug.Log("error: " + response.errorData.message);
Debug.Log("request ID: " + response.errorData.request_id);
return;
}
});
Unity
Unreal
string currencyID = "";
LootLockerSDKManager.GetCurrencyDenominationsByCode(currencyID, (response) =>
{
if(!response.success)
{
Debug.Log("error: " + response.errorData.message);
Debug.Log("request ID: " + response.errorData.request_id);
return;
}
});
Unity
Unreal
string WalletID = "";
string currencyID = "";
string amount = "100";
LootLockerSDKManager.CreditBalanceToWallet(walletID, currencyID, amount, (response) =>
{
if(!response.success)
{
Debug.Log("error: " + response.errorData.message);
Debug.Log("request ID: " + response.errorData.request_id);
return;
}
});
Unity
Unreal
string WalletID = "";
string currencyID = "";
string amount = "100";
LootLockerSDKManager.DebitBalanceToWallet(walletID, currencyID, amount, (response) =>
{
if(!response.success)
{
Debug.Log("error: " + response.errorData.message);
Debug.Log("request ID: " + response.errorData.request_id);
return;
}
});
Unity
Unreal
string walletID = "";
LootLockerSDKManager.ListBalancesInWallet(walletID, (response) =>
{
if(!response.success)
{
Debug.Log("error: " + response.errorData.message);
Debug.Log("request ID: " + response.errorData.request_id);
return;
}
});
Unity
Unreal
LootLockerSDKManager.ListCatalogs((response) =>
{
if(!response.success)
{
Debug.Log("error: " + response.errorData.message);
Debug.Log("request ID: " + response.errorData.request_id);
return;
}
});
Unity
Unreal
LootLockerSDKManager.ListCatalogItems(catalogKey, 10, "", (response) =>
{
if(!response.success)
{
Debug.Log("error: " + response.errorData.message);
Debug.Log("request ID: " + response.errorData.request_id);
return;
}
});
Unity
Unreal
string walletID = "";
LootLockerCatalogItemAndQuantityPair[] items = { };
LootLockerSDKManager.LootLockerPurchaseCatalogItems(walletID, items, (response) =>
{
if(!response.success)
{
Debug.Log("error: " + response.errorData.message);
Debug.Log("request ID: " + response.errorData.request_id);
return;
}
});
Last modified 1mo ago