In my game’s HUD I am reading variables from various actors in the world. I am wondering what the best way to keep my HUD up to date with data from those actors? I am mostly curious as to what the “UE4” way of handling HUD updates would be.
An example:
I store a specific players currency on their PlayerState on the server. That variable is replicated down to the clients. I have the HUD set up to constantly read from the currency variable on the PlayerState.
The problem is, how do I get the proper PlayerState? Do I “Get Owning Player” > “Get Player State” > “Cast to MyPlayerState” every single update or is there a pattern I can use that avoids that?