Overview
The Generic Inventory System (GIS) provides full serialization support through its inventory subsystem and allows complete customization of its underlying logic via the inventory factory.
Inventory Subsystem
GIS offers a comprehensive API through GIS_InventorySubsystem for creating/duplicating item instances, collections, and saving/loading inventories, item collections, and item instances.
Loading Blueprint
Initializing BlueprintUE renderer...
Save/Load Example
GIS provides a robust serialization API to easily integrate with any dedicated save system.
You only need to focus on saving the InventoryRecord (the inventory’s save data) to disk or a database and retrieving it to initialize the inventory system.
In the demo included with the GIS's paired project, I’ve implemented a simple component and guid based save manager to demonstrate how to use the serialization API.
Inventory Factory
The API provided by GIS_InventorySubsystem is essentially a wrapper around GIS_InventoryFactory.
You can inherit from GIS_InventoryFactory in Blueprint or C++ to fully customize GIS’s underlying operations.
Additionally, you need to specify your custom inventory factory class in Project Settings -> GIS Inventory System Settings.
note
In general, you dont need to custom this class.
Text workflow and boundaries
- Use
GIS_InventorySubsystem::SerializeInventoryto produce anFGIS_InventoryRecord; the subsystem delegates the underlying work to the configurableGIS_InventoryFactory. - Your project writes records to SaveGame, files, or a database and handles versioning, read failures, and migration. To restore, call
InitializeInventorySystemWithRecordon an uninitialized inventory component on authority. It callsDeserializeInventoryinternally and completes initialization; test collection, item, and UI events with your project initialization order. FGIS_CurrencyRecordis a separate currency record; do not assume InventoryRecord contains currency. Fragment state persistence also depends on serializable targets and SaveGame fields; see Data Mixin System.- Configure
InventoryFactoryClassinUGIS_DeveloperSettings. The companion project'sBC_GIS_Demo_SaveManager,BC_GIS_Demo_Saver, andB_GIS_Demo_SaveGameare examples. Test restart, missing assets, and version upgrades.