I have a player list on my custom GameMode blueprint. I create a function (also in game mode) which will loop through all players and find the player with the most kills.
This most kills player is then assigned to the MostKills variable on the GameInstance
From my widget (which exists on every client) I get the game instance and fetch the value of this MostKills.
A problem I am seeing is that if I print the players name in the game mode, I can see it is being set to something like “Player 1” but then - simultaneously I print the string in the widget for what it is fetching from the game instance when binding the name, and it is empty.
I know that the widget cannot access the game mode since it is running on the server and widget is running on the client, but how come the value of my MostKills is not persisting to the GameInstance?
Even if I set the variable to be replicated it is still not happening.
FYI this is for a networked game. Please let me know if anyone has any suggestions, I’d be happy to provide more details.