Best way to send data from GameMode to HUD

I have GameMode which stores an enum and a timer handler. The enum represents current state of my game and the timer represents how many time remains to end current state.

I need to draw that information on HUD of all clients, but the GameMode is available only on server.

I think that I need send a message from server to client every time when state is changed, and put new state and seconds count in the message. Or something like that.

What is the best way to do that?

AGameMode does only exist on the server, but there’s the matching AGameState class that is valid on both clients and servers. This is a good place to put global state that all player clients need to be aware of. Have a look at the Gameplay Framework Quick Reference

There is also APlayerState which might be useful for you, too. That has replicated state for a particular player (such as maybe the player’s name, team they are on, etc).

Thank you. That’s what I was looking for.