Inventory Code Components Overview

The following parts of the Inventory Prefab is more than just UI Elements:

  • NononInventoryPlayer with NononInventory Script
  • Equipment with StaticInterface Script derived from UserInterface
  • Inventory with DynamicInterface Script derived from UserInterface
  • DynamicContextMenu with DynamicContextMenu Script (Used for all ctx menus)
  • SelectConfirm Dialog with UseSelectedDialog (used for confirmation, use and split dialogs)

The following ScriptableObjects are gerated

  • ItemAssets with Script ItemObject
  • InventoryAssets with Script InventoryObject
  • Database with ItemDatabaseObject


In the folder Scripts–>ItemAssets is a list of all used Items in the Inventory

Each Item has the following Attributes that can be set:

  • Sprite for display
  • Category
  • Type
  • Description
  • Name
  • Id –> Will be automatically set if added to the Database
  • Coins
  • List of Buffs
    • Attribute
    • Value –> Is generated from Min and Max Value when converted from groundItem
    • Time for max value –> is greater 0 if it is a over time effect
    • Min
    • Max
  • Requirements
    • Attribute
    • Value
  • Stackable (yes/no)

Inventory Asset – Database

The inventory asset Database holds all items that can be used within a game.

All ItemAssets need to be in this database. If you create a new entry and drag an ItemAsset into it, the ItemAssets ID will automatically be updated.

Inventory Asset – Inventory

For each Category, there is an Inventory which represents the Items Displayed on the UI.

  • Dynamic Inventory
    • Is filled dynamically and is handled by DynamicInterface
  • Static Inventory – Handled by StaticInterface
    • Is pre-defined and the items will be set specifically

Nonon Ground Item

The NononGroundItem can be attached to the Objects that contain loot and have the same scriptable objects attached that are used in the inventory again.

Categories: Inventory


Leave a Reply

Avatar placeholder