How do I get UMG UI to show up on each player's screen in an MP game?

I’m setting up a UMG widget in my PlayerController. From tutorials I’ve seen, that seems the best way to do it, but I honestly have no idea how this should work. Here’s the setup I have:

&stc=1

PCUIEventGraph.jpg&stc=1

ClientPostLogin on Event Post Login in the GameMode.

When I launch the game, no UI elements show up at all.

Help please?

doesn’t that SetupIngameUI need a target like ‘GetPlayerController’ or a cast to it

first thing I noticed from what you’ve shown

Ah, no. To clarify, the ClientPostLogin is called in GameMode through a cast to the PlayerController so it is actually ‘self’. Sorry for the confusion.

So, it turns out a cast upstream wasn’t working so this was never called. I have the UI showing up on both player’s screens. Now I have to figure out how to make them show the same/right info. Any best practices or good tutorials would be greatly appreciated.

Keep the infos replicated. There are alot of classes that can be used for that. For example the “PlayerState”. The Server got an array of these PlayerStates and they are replicated.
So you could make your own PlayerState class and create some variables for your Player. You can then get these inside your widget and display the infos. But this is just one way.

It depens on what you want to do. If you want to show a scoreboard, you could use this method i just told you. I could be more of a help if you would tell me what information you want
to display.

If you want to go for the custom PlayerState, make sure you have your own custom GameMode BP. You can set this PlayerState only in the Default Values INSIDE of the GameMode BP.
So not in the ProjectSettings like the other BPs (Player, Controller, HUD etc.). If you open up your GameMode BP and click on “Default Settings” at the top, you will see the slot for
the PlayerState class on the right side in the options.

The array of these PlayerStates is located in the “GameState” Class. You can also create a custom BP of that class and set it inside the normal Projekt Settings.

Here you can add information about the current state of the game as well as using already made functions and variables (like the PlayerState array called “PlayerArray”)

If you need more help, feel free to ask me (: