Addon Lootbox
To create a LootboxItem, right-click inside any project folder, go to create and select LootBox/Lootbox Item.
LootboxItems are represented by Currency, so you can create a CMB currency (acronym for Common box) for example and in the lootboxitem in the CurrencyID field add the same ID as the CMB currency, so if the player has 10 CMB currencies and opens the UILootboxMenu menu he will have 10 common boxes to open.
1-Add the currencies that represent the boxes in the MonetizationManager
2-Add the UILootboxMenu prefab to the canvas in the "Home" scene and create a button to activate the UILootnoxMenu prefab
step by step video: https://www.youtube.com/watch?v=C9n2-untWNM

Public Variables Documentation
commonItems
Type:
RarityItemsDescription: Represents the collection of common rarity items available in lootboxes.
uncommonItems
Type:
RarityItemsDescription: Represents the collection of uncommon rarity items available in lootboxes.
rareItems
Type:
RarityItemsDescription: Represents the collection of rare rarity items available in lootboxes.
epicItems
Type:
RarityItemsDescription: Represents the collection of epic rarity items available in lootboxes.
legendaryItems
Type:
RarityItemsDescription: Represents the collection of legendary rarity items available in lootboxes.
lootboxItems
Type:
List<LootboxItem>Description: A list of available lootboxes that players can open to receive prizes.
lootboxContainer
Type:
TransformDescription: The parent container in the UI where all
LootboxEntryinstances are instantiated and displayed.
lootboxEntryPrefab
Type:
LootboxEntryDescription: The prefab used to instantiate each lootbox entry in the UI, representing individual lootboxes that players can interact with.
prizePopup
Type:
GameObjectDescription: A popup UI element that displays the prize won by the player after opening a lootbox.
prizeIcon
Type:
ImageDescription: The image component within the prize popup that shows the icon of the won prize.
prizeTitleText
Type:
TextMeshProUGUIDescription: The text component within the prize popup that displays the title or name of the won prize.
prizeQuantityText
Type:
TextMeshProUGUIDescription: The text component within the prize popup that shows the quantity of the won prize, if applicable.
claimButton
Type:
ButtonDescription: The button within the prize popup that players can click to claim and close the popup after receiving their prize.
animationBackground
Type:
GameObjectDescription: The background UI element used during the lootbox opening animation to provide visual effects.
boxIcon
Type:
ImageDescription: The image component of the lootbox that undergoes shaking animation when a lootbox is being opened.
Last updated