Set Game Instance Variable in Game Mode to access from Widget

GameMode class does not replicate to clients. It doesn’t even exist there (it is NULL).

GameInstance doesn’t have any replication mechanisms either, although it does exist on both server and clients, they are independent.

The right place to do this is GameState. It’s a singleton on server that replicates to everyone.
GameState already has a builtin PlayerArray variable that contains all player states and is synchronized. Just iterate that array to find who has most kills.

1 Like