Is there a better solution to this, other than breaking the struct into two independently replicated members on the actor?
context:
USTRUCT(BlueprintType)
struct FSomeStruct
{
GENERATED_BODY()
UPROPERTY(BlueprintReadOnly)
int32 MemberOne = 0;
UPROPERTY(BlueprintReadOnly)
int32 MemberTwo = 0;
};
// Member on a replicated actor
UPROPERTY(ReplicatedUsing=OnRep_SomeStructChange, VisibleAnywhere, BlueprintReadOnly)
FSomeStruct ReplicatedStruct;
// on the replicated actor with a context of auth.
ReplicatedStruct.MemeberOne = 1;
This will not trigger the server to consider ReplicatedStruct dirty and in need of replication.
the only pattern I have found to work is.
SomeStruct StackStruct = ReplicatedStruct;
StackStruct.MemberOne = 1;
ReplicatedStruct = StackStruct