Track multiple item types in a single component. Each slot has its own name, icon, capacity, and events — call Increment("Keys") or Increment(0) from any trigger. Optional card UI generates automatically.
They look similar but serve different purposes.
Increment("Keys") only adds to the Keys slot.GameStoreManager. If you only need one number, use this.Increment("Keys") by name.InputTriggerZone with tag Player. Wire On Enter → GameInventoryManager.Increment(0) (slot index) or IncrementByName("Keys"). Then disable or destroy the collectible in the same event.| Slot Field | Default | What it does |
|---|---|---|
| Item Name | Item | The name used by IncrementByName() and DecrementByName(). Make it unique and descriptive ("Keys", "Arrows", "Potions"). |
| Icon | none | Sprite shown in the UI card when Show UI is enabled. |
| Max Capacity | 10 | Increment stops at this value. onFull fires when the count reaches it. |
| Current Count | 0 | Starting count for this slot. Can be set above 0 to start with items. |
| onFull | — | Fires once when the count reaches Max Capacity. Wire to a "slot full" effect. |
| onEmpty | — | Fires once when the count drops to zero. Wire to a "out of ammo" or "no keys" response. |
| onChanged | — | Fires on every count change, passing the new count (int) as a parameter. Wire to a custom text display. |
All methods are callable from UnityEvents. Use the by-name versions — they're easier to read and still work correctly if you reorder slots later.
UseItem(0, 1) calls Decrement only if currentCount >= amount. It does nothing if the slot is empty — perfect for door locks that should only open when the player actually has a key. Use it anywhere a "can I afford this?" check is needed.Fire an event the moment a player holds the right combination of items simultaneously — no extra components needed. Define the required counts in the Combination Check section and wire On Combination Met to any response.
Increment or Decrement and fires the event the first time all requirements are met.| Field | Default | What it does |
|---|---|---|
| Persist Across Scenes | false | Carries slot counts when loading a new scene. Limited to the first 20 slots. |
| On Restart | Reset To Default | When RestartScene() is called: Reset To Default clears counts; Keep Value preserves them. |
| Show UI | false | Creates a row of icon + count cards at runtime. One card per slot, laid out left to right. |
| Show Count | true | Shows the numeric count inside each card. Uncheck for icon-only display (e.g. key slots where you just want to see the icon). |
| UI Position | (60, -120) | Top-left origin screen position for the first card. Cards extend to the right. |
| Card Size | (70, 70) | Width and height of each card in pixels (at 1920×1080). |
| Card Spacing | 8 | Gap in pixels between cards. |
| Requirements | empty | List of item + count pairs for the combination check. Each entry's Item Name must match a slot's Item Name exactly. |
| onCombinationMet | — | Fires when every requirement in the list is satisfied simultaneously. Only appears in the Inspector when at least one requirement is defined. |