Adding & Removing Items
Sorting System
UMI provides a comprehensive sorting system with 8 sort methods.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
UMI provides a comprehensive sorting system with 8 sort methods.
enum class EInventorySortType : uint8
{
Name, // Alphabetical by display name
Rarity, // By rarity tier (Common → Legendary)
Quantity, // By stack size
Weight, // By individual item weight
Category, // By gameplay tag category
Value, // By item value (price)
Durability // By current durability
};
enum class ESortOrder : uint8
{
Ascending, // A→Z, Low→High, Common→Legendary
Descending // Z→A, High→Low, Legendary→Common
};
[InventoryComponent] → SortInventory
Sort Type: Rarity
Sort Order: Descending
InventoryComponent->SortInventory(
EInventorySortType::Rarity,
ESortOrder::Descending
);
Auto Sort On Add: true
Default Sort Type: Name
Default Sort Order: Ascending
InventoryComponent->bAutoSortOnAdd = true;
InventoryComponent->DefaultSortType = EInventorySortType::Name;
InventoryComponent->DefaultSortOrder = ESortOrder::Ascending;
[InventoryComponent] → CompactInventory
InventoryComponent->CompactInventory();
Before:
[Sword] [ ] [Potion] [ ] [ ] [Ore]
After:
[Sword] [Potion] [Ore] [ ] [ ] [ ]
Axe, Bread, Health Potion, Iron Ore, Sword
Legendary Blade, Epic Armor, Rare Ring, Uncommon Potion, Common Bread
Wood x50, Stone x35, Iron Ore x20, Sword x1
Diamond ($1000), Gold Bar ($500), Silver Ring ($100), Bread ($5)
Event Custom Sort Compare
Item A: [Input]
Item B: [Input]
↓
[Your custom comparison logic]
↓
Return: -1 (A before B), 0 (equal), 1 (B before A)