Hello there currently I’m using soomla IAP and soomla is getting discontinued so i wanna switch to Unity IAP.
So, what i want know is how to lock and unlock item like car/character with a code
this is how i do it with soomla
Update ()
{
int redcar = StoreInventory.GetItemBalance(“red_car”);
if (redcar == 1)
{
redcar.GetComponent().enable = true;
locked_image.GetComponent().enable = false;
}
}
Yes red_car is non consumable and thank you for response so, under receipt i should save with playerprefs when something is unlocked and have it locked by default?
If it is a non consumable then you don’t need to save to playerprefs; you can use the receipt validation library to parse and validate the receipt and figure out if the player is entitled to it; receipts are permanently available for non consumables.