> ## Documentation Index
> Fetch the complete documentation index at: https://docs.warpathstudios.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Adding the Hotbar Component

> 1.

### Blueprint Setup

1. Open your **Character Blueprint**
2. **Add Component → Hotbar Component**
3. Configure properties, for example:

   * `Max Slots`: `9`
   * `Auto Refill Enabled`: `true`

Optionally link to the main inventory in `BeginPlay`:

```
Event BeginPlay
   ↓
Get HotbarComponent
   ↓
Set Player Inventory
   Inventory: [Main InventoryComponent]
```

### C++ Setup

```
// 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);
}
```
