Problems with casting to player in multiplayer?

I have just tried launching two sessions from in editor play, and get a bunch of errors on play regarding my casting to my player in a HUD blueprint, however this issue does not occur with one player, and I see no reason for these errors to occur. Also, when I try selecting one of two players in level while playing, they are not two actors world outliner is saying they are, instead they are objects that don’t exist? (See below)


( red circle is part of my UMG HUD, not me annotating image)
But as you can see I have player selected from viewport, but it does not show up in world outliner, and name of it (Player_UT42) does not exist in world outliner. And if I select one of players in world outliner, they don’t exist in world?


In this image you can see where error is apparently occuring. ( casting pawn to a player_ut, which it is, and which works fine in single player)


I included this image to point out bug that errors don’t link to where they mean.

PS. player which is host works perfectly?
PPS. There is also issue that I have noticed pretty much any time I’ve ever gotten errors while playing that errors refer to wrong location.

not being shown in outliner I’ve never seen, but issues with HUD/UMG and PlayerController I’ve seen.

There’s a bug that at that point things may not be initialised, can you try adding a Delay of like 0.1s before creating UMG widget? Let me know if errors go away.

That’s how I was told to do it by Epic for now to get around issue.

Regards,

Nuno Afonso

Thankyou, that fixed problem of UMG widget not working :smiley:

However this does not fix problem of players in viewport not being players in outliner, as I believe this is reason why other parts of my blueprint aren’t working, like when I try shooting a line cast at one to give damage, it doesn’t work, and I think it’s because of this problem.

Hi WarLord,

When you say “players in viewport”, are you referring to characters? Can you show me some screenshots of what you see when you select character during Play and what you see in Outliner that looks wrong to you? I’d also like to see your Line Trace setup that isn’t working. Thanks!