The MP_Inventory frontend is entirely decoupled from the backend logic. The plugin does not force a specific UI implementation. Developers can use standard Unreal Motion Graphics (UMG) components to build their interfaces.

## Data Objects for UI Lists
To integrate with UMG `UListView` or `UTileView`, the plugin utilizes a Data Object pattern.
*   **UMP_InventoryUIItem:** A `UObject` wrapper that stores a copy of the `FMP_InventoryItem` struct.
*   When the inventory updates, the UI generates or updates `UMP_InventoryUIItem` objects and passes them to the list view.
*   The UI widgets implement the `IUserObjectListEntry` interface to receive the `UMP_InventoryUIItem` data and update their visual state (e.g., icons, quantities).

## Subscribing to Delegates
The UI reacts to server-authoritative changes by binding to delegates on the `UMP_InventoryComponent` and `UMP_InventoryManager`.

### Component Delegates
Bind to these delegates on the `UMP_InventoryComponent` to monitor the main inventory state:
*   `OnInventoryUpdated(FName InventoryID, EInventoryDelta Delta, int32 SlotIndex)`: Triggered for any mutation (Add, Remove, Update) within the physical array for UI.

### Manager Delegates
Bind to these delegates on the `UMP_InventoryManager` to monitor overall state and nearby items:
*   `OnInventoryActionNotify(FName Reason)`: Triggered for operations failures/successes.
*   `OnInventoryAccessUpdate(FName InventoryID, bool bHasAccess)`: Triggered when security authorization is granted or revoked.
*   `OnInventorySync(bool bSave, FName InventoryID)`: Triggered after data serialization completes.
*   `OnNearbyLootChanged(EInventoryDelta Delta, int32 SlotIndex)`: Triggered when a ground item registers or unregisters from the local tracking array.
*   **Object References:** The `UMP_InventoryUIItem` used for proximity loot holds a direct `AActor* GroundActor` pointer. This provides O(1) direct reference to the physical actor in the world.

## Building the Interface
1.  **Initialize:** On UI construction, obtain a reference to the local Player Controller's `UMP_InventoryManager`.
2.  **Bind:** Bind custom events to the required delegates.
3.  **Populate:** Read the current state of the `FMP_InventoryFastArray` and instantiate `UMP_InventoryUIItem` objects for existing items.
4.  **Execute:** Route player inputs (clicks, drags) to the `UMP_InventoryManager` RPCs (e.g., `SwapItemsBetweenInventories`).
