Addon Lootbox
To create a LootboxItem, right-click inside any project folder, go to create and select LootBox/Lootbox Item.
Last updated
To create a LootboxItem, right-click inside any project folder, go to create and select LootBox/Lootbox Item.
Last updated
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
commonItems
Type: RarityItems
Description: Represents the collection of common rarity items available in lootboxes.
uncommonItems
Type: RarityItems
Description: Represents the collection of uncommon rarity items available in lootboxes.
rareItems
Type: RarityItems
Description: Represents the collection of rare rarity items available in lootboxes.
epicItems
Type: RarityItems
Description: Represents the collection of epic rarity items available in lootboxes.
legendaryItems
Type: RarityItems
Description: 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: Transform
Description: The parent container in the UI where all LootboxEntry
instances are instantiated and displayed.
lootboxEntryPrefab
Type: LootboxEntry
Description: The prefab used to instantiate each lootbox entry in the UI, representing individual lootboxes that players can interact with.
prizePopup
Type: GameObject
Description: A popup UI element that displays the prize won by the player after opening a lootbox.
prizeIcon
Type: Image
Description: The image component within the prize popup that shows the icon of the won prize.
prizeTitleText
Type: TextMeshProUGUI
Description: The text component within the prize popup that displays the title or name of the won prize.
prizeQuantityText
Type: TextMeshProUGUI
Description: The text component within the prize popup that shows the quantity of the won prize, if applicable.
claimButton
Type: Button
Description: The button within the prize popup that players can click to claim and close the popup after receiving their prize.
animationBackground
Type: GameObject
Description: The background UI element used during the lootbox opening animation to provide visual effects.
boxIcon
Type: Image
Description: The image component of the lootbox that undergoes shaking animation when a lootbox is being opened.