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

  1. In the Project window, right-click and select:

    Create > SlingshotPuzzle > Visual Item
  2. Rename the asset to represent the cosmetic (e.g., RedHat, BlueTrail, StarStamp).


Step 2 โ€“ Assign in GameInstance

  1. Open the MainMenu scene.

  2. Select the GameInstance object.

  3. In the Visual Items List, add your new VisualItemData asset.

  4. 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