Hidden In Game does replicate:
void AActor::SetActorHiddenInGame( bool bNewHidden )
{
if (bHidden != bNewHidden)
{
bHidden = bNewHidden;
MarkComponentsRenderStateDirty();
}
}
DOREPLIFETIME( AActor, bHidden );
Set Visibility only works on components, so isn’t any use here. It’s hard to debug why this isn’t working without the code in front of you unfortunately, but your best bet is to output visibility to the screen on client and server and try to find out if and why it’s not being updated.
Looking at the way it works, it’ll only set it to hidden properly if it’s not already hidden…
void AActor::PostNetReceive()
{
if (!bNetCheckedInitialPhysicsState)
{
// Initially we need to sync the state regardless of whether bRepPhysics has "changed" since it may not currently match IsSimulatingPhysics().
SyncReplicatedPhysicsSimulation();
SavedbRepPhysics = ReplicatedMovement.bRepPhysics;
bNetCheckedInitialPhysicsState = true;
}
ExchangeB( bHidden, SavedbHidden );
Exchange ( Owner, SavedOwner );
if (bHidden != SavedbHidden)
{
SetActorHiddenInGame(SavedbHidden);
}
if (Owner != SavedOwner)
{
SetOwner(SavedOwner);
}
}