I have a function in my PlayerController class that needs to get the game’s current HUD and call a public function on that HUD. Specifically, I have an action bound to a key, and that key should toggle the visibility of the current HUD.
I tried to get the GameMode through GEngine->GetWorld()->GetAuthGameMode()
since that contains the HUDClass itself, but the function returns null, and I think it’s because this is a networked multiplayer game.
What is the best way to get the current HUD, or the HUDClass from the GameMode?