Creating New Visual Items
The VisualItemData ScriptableObject defines cosmetic items that can be equipped on characters, such as hats, glasses, trails, or stamps.
Each cosmetic is tied to a specific slot (e.g., "hat", "trail", "stamp"), ensuring only one item per slot can be active at a time.
This system allows you to easily expand character customization by adding new visual options.
Step 1 โ Create a Visual Item Scriptable
In the Project window, right-click and select:
Create > SlingshotPuzzle > Visual ItemRename the asset to represent the cosmetic (e.g.,
RedHat,BlueTrail,StarStamp).
Step 2 โ Assign in GameInstance
Open the MainMenu scene.
Select the GameInstance object.
In the Visual Items List, add your new VisualItemData asset.
Save the scene.
Your new visual item will now appear in the shop or character customization menu.
Editable Variables (VisualItemData)
๐น Identification
itemId โ Unique numeric identifier for the visual item.
itemName โ Multilingual display name (shown in shop/selection UI).
itemDescription โ Multilingual description text.
๐น Slot
slotName โ Defines which category this item belongs to (e.g.,
"hat","trail","stamp").Only one item per slot can be equipped at a time.
๐น Visual References
previewSprite โ Icon shown in the shop or customization UI.
visualPrefab2D โ Prefab that is spawned or enabled when the item is equipped.
๐น Unlock
isUnlocked โ If true, this item starts unlocked and does not appear in the shop.
Example Uses
Hats โ Cowboy hat, wizard hat, sports cap.
Trails โ Fire trail, rainbow trail, sparkly trail.
Stamps โ Explosion mark, star print, paw print.
โก This system makes it easy to expand character customization. Developers can add new cosmetic categories simply by using a new slotName (e.g., "glasses", "backpack").
Last updated