Okay, after seeing the new way to do replicated sub objects, I've adjusted my stuff, but still not seeing the expected replication.
So I have the replicating component, which has an array of replicating actors, which have an array of replicating UObjects, which each have an array of replicating UObjects.
When an objective is made active, I want to add it to be replicated, so that all players can have the status of that objective updated on their respective HUDs.
AddReplicatedSubObject(Objective, COND_None);
for (UObjectiveTask* Task : Objective->Tasks) {
AddReplicatedSubObject(Task, COND_None);
for (UObjectiveRequirement* Requirement : Task->Requirements) {
AddReplicatedSubObject(Requirement, COND_None);
}
}
So when an objective becomes active, I call a method which does the above.
The Objective is an AActor, and everything else are UObjects. I have overriden the IsSupportedForNetworking and setup the proper GetLifetimeReplicatedProps
But it doesn't appear that my properties are being replicated at all. I added logging and I see the proper value on the server, but the wrong value on the clients.
Can I not do the subobject replication in this way?