Ninja Bear Studio Plugins Help

Inventory Events

All Inventory Events, whether related to items or containers, are centralized in the Inventory Manager.

This means you do not need to manually track events on individual fragments, containers, or item instances. Instead, you can simply listen to the appropriate event delegate exposed by the manager.

The Inventory Manager provides two primary multicast delegates for reacting to inventory-related events:

Event

Signature

OnContainerEvent

UInventoryContainer* Container, FGameplayTag EventTag, FInstancedStruct Payload

OnItemEvent

UInventoryItem* Item, FGameplayTag EventTag, FInstancedStruct Payload

Both delegates share a consistent structure:

  • Target Object: Either the Container or Item involved in the event.

  • EventTag: A Gameplay Tag that describes the event type.

  • Payload: A FInstancedStruct that holds additional data related to the event (see Event Payloads).

Binding to Events

To listen for events, simply bind to the appropriate delegate in the Inventory Manager:

Image coming soon...

Add a dynamic binding to each delegate:

InventoryManager->OnContainerEvent.AddDynamic(this, &UEventHandler::HandleContainerEvent); InventoryManager->OnItemEvent.AddDynamic(this, &UEventHandler::HandleItemEvent);

Make sure your handler functions match the delegate signatures:

UFUNCTION() void HandleContainerEvent(UInventoryContainer* Container, FGameplayTag EventTag, FInstancedStruct Payload); UFUNCTION() void HandleItemEvent(UInventoryItem* Item, FGameplayTag EventTag, FInstancedStruct Payload);

Event Payloads

Each event's payload contains data relevant to that specific action. You can safely extract this payload by checking the event's tag and casting the FInstancedStruct to the appropriate Payload Struct type.

Image coming soon...

void UEventHandler::HandleItemEvent(UInventoryItem* Item, FGameplayTag EventTag, FInstancedStruct Payload) { if (EventTag == Tag_Inventory_Event_Item_AddedToInventory) { const FInventoryItemEventPayload* ItemPayload = Payload.GetPtr<FInventoryItemEventPayload>(); if (ItemPayload) { // Handle the event... } } }

Event Reference

This section covers details for each event emitted by Containers and Items, including the correct Payload Struct and available attributes.

Container Events

All container event payloads are FInventoryContainerEventPayload or specific subtypes. The following events are broadcast by the Inventory Manager.

Additionally, the Container Instance exposes the HandleContainerEvent function that allows the instance to handle its own events, as those are triggered by the Inventory Manager.

Event And Payload

Payload Attributes

  • Inventory.Event.Container.AddedToInventory

  • FInventoryContainerEventPayload

Container

  • Inventory.Event.Container.RemovedFromInventory

  • FInventoryContainerEventPayload

Container

Item Events

All item events are delivered with a payload derived from FInventoryItemEventPayload (via FInstancedStruct).

Events are emitted in two stages:

  1. Item-scoped dispatch: The Inventory Manager calls HandleItemEvent on the item. The Item then forwards the event to each of its assigned fragments.

  2. Global broadcast: After the item-scoped dispatch, the manager emits the same event on its delegates Native_OnItemEvent (C++) and OnItemEvent (Blueprint), for systems that observe all items (UI, analytics, etc.).

The following table lists all events and their respective payload types.

Event And Payload

Payload Attributes

  • Inventory.Event.Item.AddedToInventory

  • FInventoryItemEventPayload

Item

  • Inventory.Event.Item.ContainerChanged

  • FInventoryItemContainerPlacementPayload

Item, Container, Previous Container, Position, Previous Position

  • Inventory.Event.Item.DroppedFromInventory

  • FInventoryItemDropPayload

Item, Pickup Actor

  • Inventory.Event.Item.DurabilityChanged

  • FInventoryItemDurabilityPayload

Item, Durability

  • Inventory.Event.Item.EquipmentStateChanged

  • FInventoryItemEquipmentEventPayload

Item, EquipmentStateTag

  • Inventory.Event.Item.LevelChanged

  • FInventoryItemLevelPayload

Item, Level

  • Inventory.Event.Item.PlacementInitialized

  • FInventoryItemContainerPlacementPayload

Item, Container, Previous Container, Position, Previous Position

  • Inventory.Event.Item.PositionChanged

  • FInventoryItemContainerPlacementPayload

Item, Container, Previous Container, Position, Previous Position

  • Inventory.Event.Item.RemovedFromInventory

  • FInventoryItemEventPayload

Item

  • Inventory.Event.Item.RotationChanged

  • FInventoryItemDimensionsPayload

Item, bIsRotated

  • Inventory.Event.Item.StackChanged

  • FInventoryItemStackAndQuantityPayload

Item, StackSize

Last modified: 20 August 2025