Hi,
I am trying to replicate bool variable and I get strange behaviour. When changing on server value changes on client but is incorrect (when true on server it’s false on client) but when I cange it on client the server doesn’t see that change.
In .h file I declare
UPROPERTY(EditAnywhere, BlueprintReadWrite, Transient, Replicated)
bool bIsBlocking = false;
And In constructor I call
SetReplicates(true);
Then I also set
void ATopDownARPGCharacter::GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const
{
Super::GetLifetimeReplicatedProps(OutLifetimeProps);
// Replicate to every client, no special condition required
DOREPLIFETIME(ATopDownARPGCharacter, bIsBlocking);
}
How It’s supposed to be set up to work?