Skip to main content

Inventory Subsystem Lifecycle

UInventorySubSystem derives from UGameInstanceSubsystem. Unreal creates it with each Game Instance, including separate server and client instances. Access it through Get Game Instance Subsystem in Blueprint or GameInstance->GetSubsystem<UInventorySubSystem>() in C++.

During Initialize, it creates a UInventoryManager and starts indexing the configured databases. During Deinitialize, it clears ItemIDLookup and DataBaseByItemID. Inventory component state belongs to the owner actor; the subsystem is not a SaveGame store.


Registration Is Asynchronous​

An already loaded database is indexed directly. Otherwise the manager requests an asynchronous load and indexes it in OnInventoryDatabaseLoaded. Missing item IDs are skipped, and duplicate IDs are logged and skipped. With asynchronous databases, duplicate resolution depends on which database registers first; remove duplicates instead of relying on load order.

No public all-databases-ready delegate is implemented. OnSlotDataAssetLoaded concerns a requested slot presentation asset, and OnWidgetLoaded concerns widgets; neither indicates that every database has been indexed. DataTablesToLoad is not populated in the reviewed initialization path, so the Item index built log is not a reliable global completion signal.

For a small test, check the required item/database lookups with a bounded retry. For production, provide an explicit readiness contract in your integration or a maintained plugin change. Re-resolve inventory components after possession, respawn or travel rather than retaining a destroyed Pawn's component.