I feel like I am getting closer, but have not reached the goal yet. I modified my backpack (UWearableInventoryItem) ReplicateSubobjects() function to iterate each Item and replicate it. I have verified that it is being called, but the return value after the Channel->ReplicateSubobject(Item, *Bunch, *RepFlags); is always false.
bool UWearableInventoryItem::ReplicateSubobjects(UActorChannel* Channel, FOutBunch* Bunch, FReplicationFlags* RepFlags)
{
bool bWroteSomething = false;
for(auto& Item : Inventory->GetItems())
{
//if (Channel->KeyNeedsToReplicate(Item->GetUniqueID(), Item->RepKey))
{
bWroteSomething |= Channel->ReplicateSubobject(Item, *Bunch, *RepFlags);
}
}
return bWroteSomething;
}
I have removed all the RepKey checks before writing the channel assuming this will ALWAYS cause data to get written to the channel. I am not sure why it’s returning false. I am starting to think this might have something to do with the Inventory being a Component.