I’ve been struggling with a really troublesome design problem in various forms for the last 2-3 months, in that accessing server-side data via UMG is a huge pain/basically impossible.
I’m trying to access variables from the Game Mode via a UMG. This works 100% fine on the single-player, listen server (with authority). With clients however, accessing this data becomes a design struggle.
I currently create the UMG Widget as such:
I then use Game Mode variables like this:
The results are as follows:
With UMG, it seems that clients cannot access ANY server-side data, such as Game Mode, Game State, Player State, etc. The only way I can think of so far is to duplicate every needed variable into the Character/Pawn owning the UMG widget and update it constantly (which is horribly inefficient).
Am I doing something seriously wrong with how I spawn widgets for clients? Is there a special way to communicate with server-side data or something I’ve missed altogether? Or is this just design (would Player List’s and game data not be stored in Gamemode/Gamestate?)
TLDR; What is the proper/best way to access server-side data in UMG for multiplayer clients?