// Take one item from inventory
FItemInstance InvItem = InventoryComponent->TakeItemAt(InventorySlotIndex, 1);
// Get current hotbar item
FItemInstance HotbarItem = HotbarComponent->GetItemAtIndex(HotbarSlotIndex);
// Assign inventory item to hotbar
HotbarComponent->AssignItemToSlot(InvItem, HotbarSlotIndex);
// Put old hotbar item back in inventory
if (!HotbarItem.IsEmpty())
{
InventoryComponent->AddItemInstance(HotbarItem);
}