I am using GameState to store the positions of players in an array however they have stopped working in multiplayer bellow is the code and the output
UPROPERTY(EditAnywhere, BlueprintReadWrite, replicated)
TArray<FString> CarNames;
void ARacingGameState::GetLifetimeReplicatedProps(TArray< FLifetimeProperty > & OutLifetimeProps) const
{
Super::GetLifetimeReplicatedProps(OutLifetimeProps);
DOREPLIFETIME(ARacingGameState, Timer);
DOREPLIFETIME(ARacingGameState, FinishedCars);
DOREPLIFETIME(ARacingGameState, GameState);
DOREPLIFETIME(ARacingGameState, NumLaps);
DOREPLIFETIME(ARacingGameState, CarNames);
DOREPLIFETIME(ARacingGameState, PlayersCompleted);
}
however the variables in the array do not update to the clients this is the log if I print the array at index 1
Server: DESKTOP-BSGU652-E38A
Client -2: DESKTOP-BSGU652-C5E9
Client -2: DESKTOP-BSGU652-C5E9
Any idea what may be causing this? Has anyone seen this before?