In this question: OnRep Called on Authority in Blueprint But Not C++
It is explained that setting C++ UPROPERTY values in code does automatically call the OnRep function on the authority. This makes sense when the value is set from C++, as the user is always free to call the function themselves.
However, when the value is set from Blueprint, there is no way for the user to call the OnRep function. One would expect that the OnRep would automatically be called on both authority and clients in this case.
Is this behavior by design?
Example code:
UPROPERTY(EditAnywhere, ReplicatedUsing = OnRep_Foo, BlueprintReadWrite)
bool bFoo;
UFUNCTION()
void OnRep_Foo();
In this example OnRep_Foo is only called on clients when bFoo is set from Blueprint on authority. There is no way to call OnRep_Foo on authority.