How do I replicate an inventory?

You don’t want to replicate whole objects (it’s expensive bandwidth wise). Instead you want to create a Datatable somewhere that has all your items(each containing a unique ID), then your inventory is just an array of those unique IDs:



    UPROPERTY(Replicated)
    TArray<uint32> Inventory;


Then just use that ID to look up the item stats/description/etc, so you’re only ever replicating n * 4 bytes rather than n * sizeof(FInventoryItem).