I honestly don’t understrand your question.
If you want to replicate UObject, you need to implement at the very least this function:
bool UGISInventoryBaseComponent::ReplicateSubobjects(class UActorChannel *Channel, class FOutBunch *Bunch, FReplicationFlags *RepFlags)
{
bool WroteSomething = Super::ReplicateSubobjects(Channel, Bunch, RepFlags);
/*
Should optimize it to replicate only items in array which changed.
Don't know how though. Yet.
*/
for (const FGISTabInfo& TabInfo : Tabs.InventoryTabs)
{
for (const FGISSlotInfo& SlotItem : TabInfo.TabSlots)
{
if (SlotItem.ItemData)
{
WroteSomething |= Channel->ReplicateSubobject(const_cast<UGISItemData*>(SlotItem.ItemData), *Bunch, *RepFlags);
}
}
}
return WroteSomething;
}
Sample implementation.
You can’t replicate UObjects by sending them trough RPC call as function parameter (as matter of fact you can’t replicate anything, using this method beyond simple float or int).
More complex types needs to be replicated using DOREPLIFETIME macro (or _CONDITION variant). If you want to do something with replicated data, the safest route is using RepNotify along with replication, to make sure that replicated object are available on client.