class foo : UObject
{
UPROPERTY(Replicated)
FString SharedName;
}
class SharedPawn : AActor
{
UPROPERTY(ReplicatedUsing OnRepFunction)
foo SharedProperties;
}
The replication of SharedName (when modified through a server rpc) works well but the OnRepFunction is never called.
Isn’t the modification of SharedName considered a modification of SharedProperties ?
If no, is there any function i could call to warn the engine that SharedProperties has been modified, a way of forcing replication at will so to speak, like UObject::HeyIHaveBeenModifiedDoYourJob() ?
I was (mis)lead to think it worked because i was creating SharedProperties using the PICP in the constructor, so i was literally working on only one object, giving an impression of replication.
When using the NewObject function i could check that the replication did not occur.