Improbable Icon

Forums

UE4 Singleton question

unreal

#1

Heya,

I’ve been trying to get a better understanding of things by continuing to mess with the getting started tutorial project after finishing it, but I’ve run into a problem.

The TeamScore property in the GameState singleton only appears to be replicated once when game starts, but does not run the OnRep when a player is killed.

I’ve added in UE_LOG prints and it looks like (at least one of) the servers increases the score, but the clients are never told and when trying to access that data they get the empty, game start version.

Since GameState is set up as a singleton I had expected there to be one data source, but I feel like I’m missing something.

Any advice on how to go about fixing this?

Thanks


#3

Hi @SethDavis,

Welcome to the community and thank for flagging this up. It’s an issue the team are currently looking into and investigating and hopefully, we’ll be able to get back to you with some answers and a resolution soon.

As soon as we have an update, I’ll let respond on here and let you know.

best,
Nee


#4

thanks ^^