Why when I play as client (or in a packaged game) does it not display my widget?

G,day yall

When I play my game in editor while on standalone or playing as server my game works perfectly fine, however if I play as a client, or in my packaged game, my main menu widget refuses to display.

I’m Starting to think it has something to do with the player controller not appearing in time.
Here’s my games settings:

This is the “MainMenu” level blueprint:

And thoes 2 functions (part of a function library)


I also get these 2 errors in the editor (only when playing as client)


It referring to the 2 nodes in the level blueprint
Its like my player controller is not initializing in time, or maybe my game mode isnt. Am I doing something wrong?

Do you perhaps have a per level override of the game mode inside of the main menu level (World Settings) that could be causing the casts to fail?

Nope, The game mode on the level is using the same one. (BP_MenusGM)

Ok I just noticed you are using begin play to initiate the functions.

Try moving the trigger to OnPostLogin of your GameModeBase. Then you can pass in the spawned player controller and use it to pass the correct controller.

Weird, its still not showing my hud (only client mode_ but im not getting an error for it anymore

Wouldn’t on post login only be accessible from the server anyways? Since its on the game mode itself, which is only found on the server.
The cast to BP_MenuHUD is failing.