Inventory Pro Add-On Documentation
  • Welcome to Inventory Pro Add-On for FPS Engine!
  • BEFORE WE START
    • Early Considerations
    • Add-On Compatibility
    • List of Tutorials
  • GETTING STARTED
    • 01. Basic Set-Up
    • 02. Roadmap
  • CONTENT
    • 03. Content
      • 03.1 CRAFTING
        • Recipe_SO
          • Ingredient
        • CraftingButton
        • CraftingProcess
        • CraftingUI
        • CraftingBench
        • IngredientUIIcon
      • 03.2 FAV MENU
        • FavItemSlot
        • FavItemsMenu
          • FavItemReference
      • 03.3 INTERACTABLES
        • InventoryItemPickeable
      • 03.4 INVENTORY
        • InventoryGridData_SO
        • InventoryProManager
        • GridGenerator
        • InventorySlot
        • SlotData
        • InventoryProManagerInputActions
      • 03.5 ITEMS
        • AppleItem_SO
        • EnergyDrinkItem_SO
      • 03.6 OTHERS
        • 03.6.1 TRADE HUB
          • TradeButton
          • TradeUI
          • TradeHub
        • Chest
        • ExamineItem
      • 03.7 SHOP
        • PurchasableItem
        • Shop
          • ShopItemData
        • ShopUI
        • ShopButton
      • 03.8 UI TOOLKIT
        • ContextMenu
        • HighlightInteractions
        • Padding
        • TooltipManager
    • 04. Shared Content for Add-Ons
  • HOW TO USE & GUIDES
    • Uninstalling the Add-On: Fixing Errors
    • Creating, Updating & Deleting Recipes
    • Inventory Designer: Creating, Updating & Deleting Inventory Grid Data
    • Working with Crafting Benches
    • Working with Chests
    • Working with Shops
    • Working with Purchasable Items
    • Working with Item Examination
    • Favorite Pinned Items Menu Considerations
    • Inventory, Hotbar & Chests Considerations
    • Tetris Inventory Considerations
    • Weapons & Ammo from the Inventory
    • Custom Item_SOs
    • Adding a New Inventory
  • FAQ
    • FAQ
  • SUPPORT
    • Support
Powered by GitBook
On this page
  1. CONTENT
  2. 03. Content
  3. 03.4 INVENTORY

InventorySlot

When using the Inventory or Chests in FPS Engine, Players will interact with InventorySlots. InventorySlot contains information about items, quantities & handles interactions between the InventoryProManager and the Player.


  • iconImage: Image that dipslays the Icon of the Item held by this InventorySlot

  • amountText: Text that shows the current amount or quantity stored in the slot data of this inventory slot.

  • backgroundImage: Background of the Slot. This is coloured to indicate if the Slot is Available or occupied when hovered while dragging an object.

Inventory Slot Interactions

  • highlightedScale: Inventory Slot object Scale when hovered/highlighted

  • highlightedBorder: GameObject that gets enabled when the InventorySlot is highlighted. This particularly simulates a border.

  • lerpSpeed: Speed to lerp from the default scale to the highlightedScale

  • iconImageMargins: Adjusts Icon Image Spacing to properly fit the Icons in the Slot

  • inventoryContainer: Object that contains the entire Inventory Slot


Functions | InventorySlot.cs

UpdateSlotGraphics()

Updates a specific InventorySlot visuals. Displays the Icon of the stored Item in SlotData, and displays the amount ( If Item is not null ). In case Item is null, it will reset the graphics to the default/blank state.

ClearSlot()

Resets the Slot Data of an Ivnentory Slot & Updates its Visuals

GahterSprite()

Returns proper Item Sprite based on sizing and availability.

GatherName()

Returns proper Item Name based on availability.

GatherDescription()

Returns proper Item Description based on availability.

GetAnchorSlot()

Returns current Anchor Slot. If Anchor Slot is null, it will return itself, as it cannot be anchored to anything else.

IsHotbarSlot()

Returns true if this is a hotbar slot.

IsInventorySlot()

Returns true if this is an Inventory slot.

IsChestSlot()

Returns true if this is a Chest slot.

GatherSlotType()

Returns Slot Type directly.

HasValidItem()

Returns true if SlotData of this InventorySlot contains a valid Item.

IsItemWeapon()

Returns true if the Item in Slot Data is a Weapon_SO

IsItemAttachment()

Returns true if the Item in Slot Data is a AttachmentIdentifier_SO

IsItemBullets()

Returns true if the Item in Slot Data is a BulletsItem_SO

GetItemSize()

Returns the Item Size of the Item in SlotData.

If Item is null, a default 1x1 size will be returned.

Select()

Highlights this Inventory Slot and represents it visually. Often used by Gamepad / Controller.

Unselect()

Unselects this slot and represents it visually. Often used by Gamepad / Controller.

PreviousGridGeneratorNextSlotData

Last updated 27 days ago