Skip to main content

Blueprint Function Library Helper

This class will help you to Debug, Edit, Get Information about the given inventory.

While you are customizing your inventory system, creating a new UI or equipment system; there are many helpful functions to use in here.

All of the Functions

Function NameParametersReturnDescription
GetDebugStringFromInventoryconst FString& TitleOfInventory, const FInventory& InputInventoryFStringReturns a debug string for the given inventory.
GetRandomItemStaticDataFromSettingsFGameplayTag ItemTag, bool bUseExactTagMatch, const TArray<UItemStaticData*>& ItemStaticDataArrayUItemStaticData*Returns a random item static data from the settings array that matches the given tag.
GetInventoryFromTemplateInventoryconst FTemplateInventory& TemplateInventory, UInventoryManagerComponent* InvManagerCompFInventoryCreates an inventory from the template inventory.
CoordsToIndexFIntPoint Point, FIntPoint GridSizeint32Returns the index of the given point in the grid.
IndexToCoordsint Index, FIntPoint GridSizeFIntPointReturns the coordinates of the given index in the grid.
GetIndicesInRectint StartIndex, FIntPoint TargetRectSize, FIntPoint ContainerGridSizeTArray<int32>Returns the indices of the rectangle in the grid.
CanRectangleFitInContainerint StartIndex, FIntPoint TargetRectToFit, FIntPoint ContainerGridSizeboolChecks if the given rectangle can fit in the container grid.
GetInventoryGridSizeconst FInventory& InventoryFIntPointReturns the size of the inventory grid.
GetProjectedIndicesFromCoordsint32 StartIndex, FIntPoint HoveringItemGridSize, FIntPoint ContainerGridSizeTArray<int32>Returns the projected indices of the hovering item in the container grid.
GetNumberOfItemsWillBeLeftAfterDragconst FSlotAddressWithSystem& SourceSlotAddress, ETargetTransactionType TransactionTypeint32Returns the number of items that will be left after a drag operation.
GetNumberOfItemsWillBeDraggedconst FSlotAddressWithSystem& SourceSlotAddress, ETargetTransactionType TransactionTypeint32Returns the number of items that will be dragged.
GetParentGameplayTagsFGameplayTag GameplayTagTArray<FGameplayTag>Returns the parent tags of the given tag.
GetSectionsAvailableForItemDataconst FInventory& Inventory, const FItemStaticInfo& ItemStaticDataTArray<int32>Returns the indexes of the sections that can hold the given item static data.
DoesHaveAnySlotUInventorySystem* InventorySystemboolChecks if the inventory has any slots.
GetInventorySectionconst FInventory& Inventory, int32 SectionIndexFInventorySectionReturns the inventory section that matches the given index.
GetInventorySlotFromAddressconst FSlotAddressWithSystem& SlotAddressFInventorySlotReturns the inventory slot that matches the given address.
GetItemsInSlotconst FSlotAddressWithSystem& SlotAddressTArray<UInventoryItem*>Returns the items in the slot that matches the given address.
GetInventoryAddressOfItemconst FInventory& Inventory, const UInventoryItem* ItemFSlotAddressReturns the address of the item if the given inventory item is in the inventory system.
GetAllItemsInInventoryconst FInventory& Inventory, bool bIncludeNestedItemsTArray<UInventoryItem*>Returns all the items that are in the inventory system.
CreateInventoryItemFromStaticDataUItemStaticData* ItemStaticData, UPayloadTemplate* ItemPayloadTemplateOverride, UInventoryManagerComponent* InvManagerCompUInventoryItem*Creates a new inventory item from the given static data and payload template override.