InventoryWindow
Full-screen window that shows equipment slots, item slots, and live stat totals. Extends Window and overrides Open() to call Refresh() before the panel appears.
Static access
| Member | Type | Description |
current | InventoryWindow | Singleton reference set in Awake(). Use this to open or close the window from any script. |
Methods
| Method | Description |
Open() | Calls Refresh() then shows the window. |
Close() | Hides any active tooltip, then hides the window. |
Refresh() | Reads PlayerInventory and updates all stat labels, equipment slots, and item slots to reflect the current state. |
InventoryWindow.StatSlot
Serializable inner class. Pairs a Stat asset with a TMP_Text label. Add one entry to the Stats array in the Inspector for every stat you want displayed in the window.
| Field | Type | Description |
stat | Stat | The stat asset whose current total is read from PlayerInventory.GetStatValue(stat). |
valueText | TMP_Text | Label updated by Configure() during Refresh(). |
ItemSlotLayout
Single item slot widget. Displays the item's icon and a quantity badge. Implements IPointerEnterHandler and IPointerExitHandler to show and hide a tooltip on hover.
Properties & Events
| Member | Type | Description |
item | Item (readonly) | The item currently displayed in this slot. null when the slot is empty. |
OnSelect | System.Action<Item> | Raised when OnSelectItem() is called and the slot is not empty. |
Methods
| Method | Description |
SetItem(Item item, int amount) | Updates the slot icon and quantity badge. Pass null for item to show the empty-slot placeholder. |
OnSelectItem() | Raises OnSelect with the current item if the slot is not empty. Wire this to a Button's OnClick event in the Inspector. |
EquipmentSlotLayout
Equipment slot widget that shows either the equipped item's icon or an empty-slot placeholder. Implements pointer events to show the EquipementSlot_TooltipLayout on hover.
Properties
| Property | Type | Description |
type | Equipment.Type (readonly) | The equipment category this slot represents. Set in the Inspector via the _type SerializeField. |
equipment | Equipment (get / set) | Gets or sets the currently displayed equipment. Setting it updates the slot icon automatically and toggles the empty-slot placeholder. |
EquipementSlot_TooltipLayout
Floating tooltip panel that shows an item's name, description, stat bonuses, and active effects. Called statically — there is one shared instance per scene accessed via current.
Static Members
| Member | Description |
current | Singleton instance set in Awake(). |
Show(Item item, Vector2 position, Vector2 offset) | Positions the tooltip at the given screen coordinates plus offset, populates it with the item's data, and makes it visible. For Equipment assets the stat and effect lists are spawned dynamically. |
Hide() | Hides the tooltip and destroys any dynamically spawned stat or effect rows. |