Blueprint Setup
- Open your Character Blueprint
- Add Component → Hotbar Component
-
Configure properties, for example:
Max Slots:9Auto Refill Enabled:true
BeginPlay:
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Max Slots: 9Auto Refill Enabled: trueBeginPlay:
Event BeginPlay
↓
Get HotbarComponent
↓
Set Player Inventory
Inventory: [Main InventoryComponent]
// In Character.h
UPROPERTY(VisibleAnywhere, BlueprintReadOnly)
UHotbarComponent* HotbarComponent;
// In Character.cpp constructor
HotbarComponent = CreateDefaultSubobject<UHotbarComponent>(TEXT("HotbarComponent"));
HotbarComponent->MaxSlots = 9;
HotbarComponent->bAutoRefillEnabled = true;
// In BeginPlay
void AMyCharacter::BeginPlay()
{
Super::BeginPlay();
HotbarComponent->SetPlayerInventory(InventoryComponent);
}