Creating New Shop Items
The ShopItemData ScriptableObject defines the items that appear in the in-game shop.
It supports three different product types:
Visual → Cosmetic items (hats, trails, stamps, etc.)
Booster → Consumable power-ups (Double Damage, Slow Time, etc.)
Currency → Currency packs (e.g., +100 Coins, +50 Gems)
Step 1 – Create a Shop Item Scriptable
In the Project window, right-click and select:
Create > SlingshotPuzzle > Shop ItemRename the asset to represent the product (e.g.,
Hat_Red,Booster_Explosion,GemPack_50).
Step 2 – Assign in GameInstance
Open the MainMenu scene.
Select the GameInstance object.
In the Shop Items List, add your new ShopItemData asset.
Save the scene.
Your shop item will now appear in the in-game store UI.
Editable Variables (ShopItemData)
🔹 Basic Info
itemKind → Defines the type of shop product:
Visual→ Cosmetic item (requires a VisualItemData reference).Booster→ Power-up item (requires a BoosterData reference).Currency→ Currency pack that grants coins, gems, etc.
itemName → Multilingual display name shown in the shop.
itemDescription → Multilingual description text.
🔹 Shop Presentation
icon → Thumbnail shown in the shop grid.
category → Optional filter category (e.g.,
"Hats","Boosters").Auto-filled from
slotNameif itemKind = Visual.
🔹 Pricing
costCurrencyId → Which currency is used for purchase (e.g.,
"coins","gems").costAmount → Price in that currency.
🔹 Visual Reference (only when ItemKind = Visual)
visualItem → Reference to a VisualItemData (hat, trail, stamp, etc.).
🔹 Booster Reference (only when ItemKind = Booster)
boosterItem → Reference to a BoosterData (Double Damage, Explosion, etc.).
🔹 Currency Reward (only when ItemKind = Currency)
rewardCurrencyId → ID of the currency granted (e.g.,
"coins","gems").rewardCurrencyAmount → Amount of currency granted to the player.
✅ Example Uses
Visual Item → A “Cowboy Hat” cosmetic sold for 100 coins.
Booster Item → An “Explosion Booster” consumable sold for 50 gems.
Currency Pack → A “+500 Coins” pack sold for 5 gems.
The shop system is flexible: new product types can be added by creating new ItemKind categories and extending the shop logic if needed.
Last updated