1. Home
  2. Docs
  3. Inventory System
  4. Documentation
  5. Inventory Manager Component

Inventory Manager Component

Server Only does not mean they can only be executed on servers. Server Only mean that clients can not securely access this function and need to use the equivilant “SERVER // ” event to execute these functions.
Normally clients send a interface message to the controller and the controller sends a event to the server to execute the request. (See example inventory controller)

Function NameServer OnlyDescription
InitInventoryManagerYesSet the player inventory for management
SetUIReferenceNoSet the ui reference, only needed on clients
OpenContainerYesOpens a container. If the container is already open it will be closed
MoveItemYesMove a item between inventorys or/and slots
StackItemsYesStack items together
UseItemSlotYesTry to use the specific item slot
DeleteItemYesDelete the item in this slot
DoesItemFitInSlotNoReturns true if the item can be stored in this slot (does not check stacking)
CloseContainerYesClose the current container
OpenContainerWidgetNoOpen the container widget of the UI reference
CloseContainerWidgetNoClose the container widget of the UI reference
OpenInventoryWidgetNoOpen the inventory widget of the UI reference
CloseInventoryWidgetNoClose the inventory widget of the UI reference
ToggleInventoryWidgetNoToggle the inventory widget of the UI reference
ToggleCharacterWidgetNoToggle the character widget of the UI reference
OpenCharcterWidgetNoOpen the character widget of the UI reference
CloseCharacterWidgetNoClose the character widget of the UI reference
LootActorYesTry to move all items from the loot actor into the inventory. Destroy the actor on success
Drop ItemYesConstruct a world actor and store the item in it. Deletes the item in the inventory
CraftItemYesTry to remove all needed resources and add a item on success
CloseCraftingWidgetNoClose the crafting widget of the UI reference
OpenCraftingWidgetNoOpen the crafting widget of the UI reference
ToggleCraftingWidgetNoToggle the crafting widget of the UI reference
OpenStatWidgetNoOpen the stat widget of the UI reference
CloseStatWidgetNoClose the stat widget of the UI reference
ToggleStatWidgetNoToggle the stat widget of the UI reference
UseHotbarSlotNoUse a hotbar slot.
Get UILayoutInfoNoGet all layout informations from the widgets inside the UI reference
Load UILayoutNoLoad the last saved UI layout
Save UILayoutNoSave the current UI layout (does not save it on disk only locally)
Reset UILayoutNoReset the UI layout to the layout on initilize
UseInventoryItemYesUse a specific inventory item. Must have item
Split ItemYesSplit a item from slot x to slot y

Variable NameDescription
PlayerInventoryThe player inventory, set on Initilize Manager
ContainerInventoryCurrent container, set on “open container”
UIReferenceUI Reference. Used to open close specific widgets, like inventory or character box
UILayoutlast saved layout informations
DefaultLayoutInfolayout information based on the layout at the time of loading the UI reference

The manager executes all events to manage one or two inventorys (player inventory and container).
The container can be any inventory.

How can we help?